From: Sripathi Kodi <sripathik@in.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-9p: Fix the memset usage
Date: Wed, 30 Jun 2010 10:45:45 +0530 [thread overview]
Message-ID: <20100630104545.2b1ee60b@in.ibm.com> (raw)
In-Reply-To: <1277873129-8021-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Wed, 30 Jun 2010 10:15:29 +0530
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> The arguments are wrong. Use qemu_mallocz directly
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: Sripathi Kodi <sripathik@in.ibm.com>
> ---
> 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
>
>
prev parent reply other threads:[~2010-06-30 5:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 4:45 [Qemu-devel] [PATCH] virtio-9p: Fix the memset usage Aneesh Kumar K.V
2010-06-30 5:15 ` Sripathi Kodi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100630104545.2b1ee60b@in.ibm.com \
--to=sripathik@in.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).