All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org,  QEMU Trivial <qemu-trivial@nongnu.org>
Cc: riku.voipio@iki.fi
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user: Use g_new() & friends where that makes obvious sense
Date: Thu, 24 Sep 2015 09:18:12 +0200	[thread overview]
Message-ID: <5603A3B4.1020900@weilnetz.de> (raw)
In-Reply-To: <87h9mkthx7.fsf@blackfin.pond.sub.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 24.09.2015 um 09:06 schrieb Markus Armbruster:
> Ping?
> 
> 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.
>> 
>> This commit only touches allocations with size arguments of the 
>> form sizeof(T).  Same Coccinelle semantic patchas in commit 
>> b45c03f.
>> 
>> Signed-off-by: Markus Armbruster <armbru@redhat.com> --- 
>> linux-user/elfload.c | 2 +- linux-user/main.c    | 2 +- 
>> linux-user/syscall.c | 2 +- 3 files changed, 3 insertions(+), 3 
>> deletions(-)

Reviewed-by: Stefan Weil <sw@weilnetz.de>

This patch is trivial enough for qemu-trivial.

As Eric has written, the commit message needs
a small correction: s/patchas/patch as/

Regards
Stefan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJWA6OuAAoJEOCMIdVndFCt6Q8P/R6kKihtOvr17lL3Av117n1z
YPv6Tfa9jy1fd3qaeIMhXgm63CNTWTGU4o0A9/k3thqiD9kYVpqeZkd7gt1gE6uU
QR/eReEMZNr+5AnkYnCmZ8wr5upd4RWUjCvbGSUpFgb1ui+VtwZ08XzCVehQfY39
2S6EWxR/I7ETxzue+AFZak9w4QqVF7IQmw7CPkeTCD/himdCpyeGxL9dYQnyfEdW
mQeXUR2eipaqwIt1b6JkwQCU78rY2D/OLVDipZK9M4BSmJQWS2BsLboc+VC59bN9
JkVrKgSbuciqBMXDudY71qv9XO/wyM8MwnDM5GY7V9N1PoRVcg2mvSCRKq9lP82K
V0Sb6n1j9/AgM3ngnLZqkiVYkeFrnccIkiKCJvmDnDP1ClC8Cy5V1wkPzk7TJgTK
4xvuI3kfWPIzbphWzZtcCstJKYaO5ydrEGGNGko37A6s65oE+gIhyrv/KSIhix+H
n7KMOILY4wuk7UYoIgK6cvKL6QsVyhw0lR+RIR8p33ofAj20HylQng38h6spr50F
XTl3J38ApbyxNhw+EJHXXwj14YJFrZTwN8C0X49UHkSD4wqR4lH+2kdNUYIYJJHR
Zx+HkJj/8hLQq14WjtgZlNQ7noAck/yh9Rvyu54v6yfx1RAhNkDbiysQKgqkWzNM
U5ro2khoY2BrI7Bdq29H
=/Z+4
-----END PGP SIGNATURE-----


WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: riku.voipio@iki.fi
Subject: Re: [Qemu-devel] [PATCH] linux-user: Use g_new() & friends where that makes obvious sense
Date: Thu, 24 Sep 2015 09:18:12 +0200	[thread overview]
Message-ID: <5603A3B4.1020900@weilnetz.de> (raw)
In-Reply-To: <87h9mkthx7.fsf@blackfin.pond.sub.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 24.09.2015 um 09:06 schrieb Markus Armbruster:
> Ping?
> 
> 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.
>> 
>> This commit only touches allocations with size arguments of the 
>> form sizeof(T).  Same Coccinelle semantic patchas in commit 
>> b45c03f.
>> 
>> Signed-off-by: Markus Armbruster <armbru@redhat.com> --- 
>> linux-user/elfload.c | 2 +- linux-user/main.c    | 2 +- 
>> linux-user/syscall.c | 2 +- 3 files changed, 3 insertions(+), 3 
>> deletions(-)

Reviewed-by: Stefan Weil <sw@weilnetz.de>

This patch is trivial enough for qemu-trivial.

As Eric has written, the commit message needs
a small correction: s/patchas/patch as/

Regards
Stefan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJWA6OuAAoJEOCMIdVndFCt6Q8P/R6kKihtOvr17lL3Av117n1z
YPv6Tfa9jy1fd3qaeIMhXgm63CNTWTGU4o0A9/k3thqiD9kYVpqeZkd7gt1gE6uU
QR/eReEMZNr+5AnkYnCmZ8wr5upd4RWUjCvbGSUpFgb1ui+VtwZ08XzCVehQfY39
2S6EWxR/I7ETxzue+AFZak9w4QqVF7IQmw7CPkeTCD/himdCpyeGxL9dYQnyfEdW
mQeXUR2eipaqwIt1b6JkwQCU78rY2D/OLVDipZK9M4BSmJQWS2BsLboc+VC59bN9
JkVrKgSbuciqBMXDudY71qv9XO/wyM8MwnDM5GY7V9N1PoRVcg2mvSCRKq9lP82K
V0Sb6n1j9/AgM3ngnLZqkiVYkeFrnccIkiKCJvmDnDP1ClC8Cy5V1wkPzk7TJgTK
4xvuI3kfWPIzbphWzZtcCstJKYaO5ydrEGGNGko37A6s65oE+gIhyrv/KSIhix+H
n7KMOILY4wuk7UYoIgK6cvKL6QsVyhw0lR+RIR8p33ofAj20HylQng38h6spr50F
XTl3J38ApbyxNhw+EJHXXwj14YJFrZTwN8C0X49UHkSD4wqR4lH+2kdNUYIYJJHR
Zx+HkJj/8hLQq14WjtgZlNQ7noAck/yh9Rvyu54v6yfx1RAhNkDbiysQKgqkWzNM
U5ro2khoY2BrI7Bdq29H
=/Z+4
-----END PGP SIGNATURE-----

  reply	other threads:[~2015-09-24  7:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 11:53 [Qemu-devel] [PATCH] linux-user: Use g_new() & friends where that makes obvious sense Markus Armbruster
2015-09-14 15:51 ` Eric Blake
2015-09-14 16:08   ` Eric Blake
2015-09-24  7:06 ` Markus Armbruster
2015-09-24  7:18   ` Stefan Weil [this message]
2015-09-24  7:18     ` Stefan Weil
2015-09-24 16:19     ` [Qemu-trivial] " Markus Armbruster
2015-09-24 16:19       ` Markus Armbruster
2015-10-03 17:07     ` [Qemu-trivial] " Michael Tokarev
2015-10-03 17:07       ` 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=5603A3B4.1020900@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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.