From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34318 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTpeO-0006qT-EV for qemu-devel@nongnu.org; Wed, 30 Jun 2010 01:15:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTpeN-00070c-Eh for qemu-devel@nongnu.org; Wed, 30 Jun 2010 01:15:56 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:56762) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTpeM-0006zx-Ta for qemu-devel@nongnu.org; Wed, 30 Jun 2010 01:15:55 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp02.au.ibm.com (8.14.4/8.13.1) with ESMTP id o5U5BwUg010755 for ; Wed, 30 Jun 2010 15:11:58 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5U5FmKJ1200380 for ; Wed, 30 Jun 2010 15:15:49 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5U5FmTl000406 for ; Wed, 30 Jun 2010 15:15:48 +1000 Date: Wed, 30 Jun 2010 10:45:45 +0530 From: Sripathi Kodi Subject: Re: [Qemu-devel] [PATCH] virtio-9p: Fix the memset usage Message-ID: <20100630104545.2b1ee60b@in.ibm.com> In-Reply-To: <1277873129-8021-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1277873129-8021-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K.V" Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Wed, 30 Jun 2010 10:15:29 +0530 "Aneesh Kumar K.V" wrote: > The arguments are wrong. Use qemu_mallocz directly > > Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sripathi Kodi > --- > hw/virtio-9p.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c > index 5c5a34b..fba6619 100644 > --- a/hw/virtio-9p.c > +++ b/hw/virtio-9p.c > @@ -2782,8 +2782,7 @@ static void v9fs_wstat_post_chown(V9fsState *s, V9fsWstatState *vs, int err) > if (vs->v9stat.name.size != 0) { > V9fsRenameState *vr; > > - vr = qemu_malloc(sizeof(V9fsRenameState)); > - memset(vr, sizeof(*vr), 0); > + vr = qemu_mallocz(sizeof(V9fsRenameState)); > vr->newdirfid= -1; > vr->pdu = vs->pdu; > vr->fidp = vs->fidp; > -- > 1.7.2.rc0 > >