From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSFPN-0003sf-Ij for qemu-devel@nongnu.org; Wed, 28 Jan 2009 13:45:05 -0500 Received: from [199.232.76.173] (port=37605 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSFPM-0003rz-GB for qemu-devel@nongnu.org; Wed, 28 Jan 2009 13:45:04 -0500 Received: from imp02.mtu.ru ([62.5.255.19]:47590) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LSFPL-0004xp-Tt for qemu-devel@nongnu.org; Wed, 28 Jan 2009 13:45:04 -0500 Received: from ss27-so03.mtu.ru (localhost [127.0.0.1]) by ss27-so03.mtu.ru (Postfix) with ESMTP id 6E050284103 for ; Wed, 28 Jan 2009 21:44:56 +0300 (MSK) Received: from imp01.mtu.ru (alt-proxy-1.mtu.ru [62.5.255.74]) by ss27-so03.mtu.ru (Postfix) with ESMTP id 65EBB284100 for ; Wed, 28 Jan 2009 21:44:56 +0300 (MSK) From: Pavel Vasilyev Date: Wed, 28 Jan 2009 21:44:46 +0300 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3556656.hkXjErRPhn"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200901282144.55730.pavel@pavlinux.ru> Subject: [Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace calloc() instead malloc() Reply-To: pavel@pavlinux.ru, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --nextPart3556656.hkXjErRPhn Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline May be this better?=20 =2D-- qemu-malloc.c Base (BASE) +++ qemu-malloc.c Locally Modified (Based On LOCAL) @@ -46,10 +46,9 @@ void *(size_t size) { void *ptr; =2D ptr =3D qemu_malloc(size); + ptr =3D calloc(1, size); if (!ptr) return NULL; =2D memset(ptr, 0, size); return ptr; } =20 --nextPart3556656.hkXjErRPhn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBJgKenMFsE+gWr1VkRAil3AJ9vRDfNzfOnQKMDx9FiLp+Ot0AtXACeKGRr AQIZ12ehV4gCo6ZC2YWBDm0= =1FzY -----END PGP SIGNATURE----- --nextPart3556656.hkXjErRPhn--