From: Markus Armbruster <armbru@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2 1/4] ui: Use g_new() & friends where that makes obvious sense
Date: Tue, 03 Nov 2015 14:49:09 +0100 [thread overview]
Message-ID: <87y4efchwq.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <5638A32D.90907@msgid.tls.msk.ru> (Michael Tokarev's message of "Tue, 03 Nov 2015 15:06:05 +0300")
Michael Tokarev <mjt@tls.msk.ru> writes:
> 29.10.2015 18:55, Markus Armbruster wrote:
>> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
>> for two reasons. One, it catches multiplication overflowing size_t.
>> Two, it returns T * rather than void *, which lets the compiler catch
>> more type errors.
>>
>> This commit only touches allocations with size arguments of the form
>> sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>> ---
>> ui/console.c | 2 +-
>> ui/curses.c | 2 +-
>> ui/input-legacy.c | 4 ++--
>> ui/keymaps.c | 2 +-
>> ui/sdl.c | 2 +-
>> ui/vnc-jobs.c | 6 +++---
>> ui/vnc.c | 6 +++---
>> 7 files changed, 12 insertions(+), 12 deletions(-)
>
> ui/vnc.c code has been modified by Eric Blake meanwhile,
> in 2d32addae70987521578d8bb27c6b3f52cdcbdcb "sockets:
> Convert to new qapi union layout".
>
> The patch applies for other files however.
I can regenerate this patch easily. Would you be willing to replace it
in your tree by a v3?
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/4] ui: Use g_new() & friends where that makes obvious sense
Date: Tue, 03 Nov 2015 14:49:09 +0100 [thread overview]
Message-ID: <87y4efchwq.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <5638A32D.90907@msgid.tls.msk.ru> (Michael Tokarev's message of "Tue, 03 Nov 2015 15:06:05 +0300")
Michael Tokarev <mjt@tls.msk.ru> writes:
> 29.10.2015 18:55, Markus Armbruster wrote:
>> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
>> for two reasons. One, it catches multiplication overflowing size_t.
>> Two, it returns T * rather than void *, which lets the compiler catch
>> more type errors.
>>
>> This commit only touches allocations with size arguments of the form
>> sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
>>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>> ---
>> ui/console.c | 2 +-
>> ui/curses.c | 2 +-
>> ui/input-legacy.c | 4 ++--
>> ui/keymaps.c | 2 +-
>> ui/sdl.c | 2 +-
>> ui/vnc-jobs.c | 6 +++---
>> ui/vnc.c | 6 +++---
>> 7 files changed, 12 insertions(+), 12 deletions(-)
>
> ui/vnc.c code has been modified by Eric Blake meanwhile,
> in 2d32addae70987521578d8bb27c6b3f52cdcbdcb "sockets:
> Convert to new qapi union layout".
>
> The patch applies for other files however.
I can regenerate this patch easily. Would you be willing to replace it
in your tree by a v3?
next prev parent reply other threads:[~2015-11-03 13:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 15:55 [Qemu-trivial] [PATCH v2 0/4] ui audio qxl usb: Use g_new() & friends where that makes obvious sense Markus Armbruster
2015-10-29 15:55 ` [Qemu-devel] " Markus Armbruster
2015-10-29 15:55 ` [Qemu-trivial] [PATCH v2 1/4] ui: " Markus Armbruster
2015-10-29 15:55 ` [Qemu-devel] " Markus Armbruster
2015-11-03 12:06 ` [Qemu-trivial] " Michael Tokarev
2015-11-03 12:06 ` [Qemu-devel] " Michael Tokarev
2015-11-03 13:49 ` Markus Armbruster [this message]
2015-11-03 13:49 ` Markus Armbruster
2015-11-03 16:12 ` [Qemu-trivial] [PATCH v3 " Markus Armbruster
2015-11-03 16:12 ` [Qemu-devel] " Markus Armbruster
2015-10-29 15:55 ` [Qemu-trivial] [PATCH v2 2/4] audio: " Markus Armbruster
2015-10-29 15:55 ` [Qemu-devel] " Markus Armbruster
2015-10-29 15:55 ` [Qemu-trivial] [PATCH v2 3/4] qxl: " Markus Armbruster
2015-10-29 15:55 ` [Qemu-devel] " Markus Armbruster
2015-10-29 15:55 ` [Qemu-trivial] [PATCH v2 4/4] usb: " Markus Armbruster
2015-10-29 15:55 ` [Qemu-devel] " Markus Armbruster
2015-10-30 11:13 ` [Qemu-trivial] [PATCH v2 0/4] ui audio qxl " Gerd Hoffmann
2015-10-30 11:13 ` [Qemu-devel] " Gerd Hoffmann
2015-10-30 11:31 ` [Qemu-trivial] " Gerd Hoffmann
2015-10-30 11:31 ` Gerd Hoffmann
2015-10-30 14:16 ` [Qemu-trivial] " Markus Armbruster
2015-10-30 14:16 ` Markus Armbruster
2015-11-03 12:09 ` [Qemu-trivial] " Michael Tokarev
2015-11-03 12:09 ` [Qemu-devel] " Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4efchwq.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.