From: Michael Tokarev <mjt@tls.msk.ru>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, sfeldma@gmail.com, jiri@resnulli.us
Subject: Re: [Qemu-trivial] [PATCH] rocker: Use g_new() & friends where that makes obvious sense
Date: Sat, 03 Oct 2015 20:05:23 +0300 [thread overview]
Message-ID: <56100AD3.20707@msgid.tls.msk.ru> (raw)
In-Reply-To: <87oagrbxjw.fsf@blackfin.pond.sub.org>
24.09.2015 19:18, Markus Armbruster wrote:
> Michael, could you take this one through trivial? Assuming Scott and
> Jiri don't mind, and with s/patchas/patch as/ in the commit message.
>
> Markus Armbruster <armbru@redhat.com> writes:
>
>> 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.
Applied to -trivial, thanks!
/mjt
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, sfeldma@gmail.com, jiri@resnulli.us
Subject: Re: [Qemu-devel] [PATCH] rocker: Use g_new() & friends where that makes obvious sense
Date: Sat, 03 Oct 2015 20:05:23 +0300 [thread overview]
Message-ID: <56100AD3.20707@msgid.tls.msk.ru> (raw)
In-Reply-To: <87oagrbxjw.fsf@blackfin.pond.sub.org>
24.09.2015 19:18, Markus Armbruster wrote:
> Michael, could you take this one through trivial? Assuming Scott and
> Jiri don't mind, and with s/patchas/patch as/ in the commit message.
>
> Markus Armbruster <armbru@redhat.com> writes:
>
>> 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.
Applied to -trivial, thanks!
/mjt
next prev parent reply other threads:[~2015-10-08 7:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 11:52 [Qemu-devel] [PATCH] rocker: Use g_new() & friends where that makes obvious sense Markus Armbruster
2015-09-14 11:57 ` Jiri Pirko
2015-09-14 15:55 ` Eric Blake
2015-09-14 16:09 ` Eric Blake
2015-09-14 16:11 ` Markus Armbruster
2015-09-14 19:40 ` Jiri Pirko
2015-09-24 16:18 ` [Qemu-trivial] " Markus Armbruster
2015-09-24 16:18 ` [Qemu-devel] " Markus Armbruster
2015-09-24 18:48 ` [Qemu-trivial] " Jiri Pirko
2015-09-24 18:48 ` [Qemu-devel] " Jiri Pirko
2015-10-03 17:05 ` Michael Tokarev [this message]
2015-10-03 17:05 ` 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=56100AD3.20707@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=armbru@redhat.com \
--cc=jiri@resnulli.us \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sfeldma@gmail.com \
/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.