From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbVds-0004rv-12 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:26:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbVdp-0002Vv-Ax for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:26:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbVdp-0002Vm-6H for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:26:01 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id DF90B80091 for ; Mon, 14 Sep 2015 15:26:00 +0000 (UTC) References: <1442228637-31481-1-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55F6E701.6000309@redhat.com> Date: Mon, 14 Sep 2015 09:25:53 -0600 MIME-Version: 1.0 In-Reply-To: <1442228637-31481-1-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="G9ctjQa31fOwAmnqkKcc7eETgn1Gj7LMp" Subject: Re: [Qemu-devel] [PATCH] audio: 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) --G9ctjQa31fOwAmnqkKcc7eETgn1Gj7LMp 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 > --- Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --G9ctjQa31fOwAmnqkKcc7eETgn1Gj7LMp 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/ iQEcBAEBCAAGBQJV9ucBAAoJEKeha0olJ0Nq3HoH/3Cg1Y64h8YCISoMq9/kI+PR FtW18hkar6kHmvbd+rQjIn3IJsGTrJTNYhZSasgNu2Zx4IO358hCuf+VaazjNuOc 498tZ/PxKLCFsan1BrjNI7+6XIMvI50toy9lIC2H/cvplPY0M0sv5FxS1ovFCSzm 8shox0W7ahaOmVvHP2doKf5Ttd4ZdndBrbjzMv43UZ29g3qGtjzYc1BzIp46844r OUrjWnxp0HrW/9AEVAbMGeZVFhQdj1HQKRnfah2rKUsQOC6IcWxc4rkXHIe1HS0L m7vB0OCPQFl5XsQkXfLaYTgNTR2a5A59idQl0/QpSqOKhT/FEGx/whXMup1641U= =5ynJ -----END PGP SIGNATURE----- --G9ctjQa31fOwAmnqkKcc7eETgn1Gj7LMp--