From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbVeq-0006L7-H4 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbVen-0003Gw-QM for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:27:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbVen-0003GN-LN for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:27:01 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 680F7AACC7 for ; Mon, 14 Sep 2015 15:27:01 +0000 (UTC) References: <1442228637-31481-2-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55F6E742.8050702@redhat.com> Date: Mon, 14 Sep 2015 09:26:58 -0600 MIME-Version: 1.0 In-Reply-To: <1442228637-31481-2-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WVHIR7slSlld4wODb7vdWM0uop4wBVVcg" Subject: Re: [Qemu-devel] [PATCH] qxl: Use g_new() & friends where that makes obvious sense List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kraxel@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WVHIR7slSlld4wODb7vdWM0uop4wBVVcg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/14/2015 05:03 AM, 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. >=20 > This commit only touches allocations with size arguments of the form > sizeof(T). Same Coccinelle semantic patch as in commit b45c03f. >=20 > Signed-off-by: Markus Armbruster > --- > hw/display/qxl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WVHIR7slSlld4wODb7vdWM0uop4wBVVcg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV9udCAAoJEKeha0olJ0NqhGMH/iF0u6IcqGyRaErQYMGHoSUC c9hox8MBfQaDMwra6L9Ik7JICVfLQAsKDP2zoYCRTTIPAf3ArxBZh6p58kYOR8fb co/yTYHrRVR3S9Fgu6e5xrUVQi/KUeFZYNQ0mt8C3mgeZw+SQOAvHMXeqcpu02ZQ M8H1EXZ9BTFPKfdVd07aN6ZXXzwNCrMAZhQPGGbQ1zaA6wZGuZStYozJS7symK9L kE1SmSB8GvaJg5iYwVY7wY+poyuJEUDs9cwtxVBmohnfDSn/3twHhelsHWTjY4bh JdgpFU4w83mwhybiuWbH2rXVNVyT5nxUyiTeQwHmUXm7AdpBZiNubpgU+oAthWo= =feVU -----END PGP SIGNATURE----- --WVHIR7slSlld4wODb7vdWM0uop4wBVVcg--