From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbWJx-00036p-18 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 12:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbWJt-0002yS-29 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 12:09:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbWJs-0002xc-T7 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 12:09:29 -0400 References: <1442231543-23446-1-git-send-email-armbru@redhat.com> <20150914115736.GA2111@nanopsycho.orion> <55F6EDFC.2070503@redhat.com> From: Eric Blake Message-ID: <55F6F137.70002@redhat.com> Date: Mon, 14 Sep 2015 10:09:27 -0600 MIME-Version: 1.0 In-Reply-To: <55F6EDFC.2070503@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3sxxTQkT29I4rkOmDmgiJjbigPR7StHMt" Subject: Re: [Qemu-devel] [PATCH] rocker: Use g_new() & friends where that makes obvious sense List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jiri Pirko , Markus Armbruster Cc: sfeldma@gmail.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3sxxTQkT29I4rkOmDmgiJjbigPR7StHMt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/14/2015 09:55 AM, Eric Blake wrote: > On 09/14/2015 05:57 AM, Jiri Pirko wrote: >> Mon, Sep 14, 2015 at 01:52:23PM CEST, armbru@redhat.com 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 patchas in commit b45c03f. >> >> ^ typo :) >> >=20 > This typo is copy-pasted into ALL of your recent g_new() cleanups. Actually, not all of them. And when I first read your report of the typo, I was thinking that it meant 'patches', although now I see that it should be two words 'patch as= '. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3sxxTQkT29I4rkOmDmgiJjbigPR7StHMt 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/ iQEcBAEBCAAGBQJV9vE3AAoJEKeha0olJ0NqMZsH/ikC+4zZaOh02+Y/F9zhAzOz vZWq420sZbpJsdntgL/Po9UBRzBch401jAK2oNwu+SEL8BnE/dMD+bbnDJOp6N95 jvMsDJVGZ1+86tF1JdJIGa+WwR9NsLHr93nNi6P7pXZR6noUhV9/MWzBQ+TpP+8L CMRT3FUlYwcC4jSuoZUzyJQ9ANRRgM9Euzih9thGRspGJT6M6uZ0k2ZIqoRn6cmC bTsafRawNs0U8yA3G/FqyPPQP5ijFFgPA7xi45PTLI/CCl8bmi89PCI+X/iDpFcL zwckk0EdAxmDTTCmPq9MvvqSdLKpsNP5wfJY0KIz/TO8NU3TfG3MY8/hvq9zDyI= =oD7Q -----END PGP SIGNATURE----- --3sxxTQkT29I4rkOmDmgiJjbigPR7StHMt--