From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] scsi-generic: correct usage of memset().
Date: Mon, 22 Sep 2008 10:27:13 -0500 [thread overview]
Message-ID: <48D7B951.9010802@codemonkey.ws> (raw)
In-Reply-To: <1222095152.4151.6.camel@frecb07144>
Laurent Vivier wrote:
> void *memset(void *s, int c, size_t n);
>
> DESCRIPTION
> The memset() function fills the first n bytes of the
> memory area
> pointed to by s with the constant byte c."
>
> Reported by Dietmar Maurer.
>
Applied. Thanks.
Regards,
Anthony Liguori
> Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
> ---
> hw/scsi-generic.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: qemu/hw/scsi-generic.c
> ===================================================================
> --- qemu.orig/hw/scsi-generic.c 2008-09-22 10:46:42.000000000 +0200
> +++ qemu/hw/scsi-generic.c 2008-09-22 14:32:26.000000000 +0200
> @@ -548,8 +548,8 @@ static int get_blocksize(BlockDriverStat
> sg_io_hdr_t io_header;
> int ret;
>
> - memset(cmd, sizeof(cmd), 0);
> - memset(buf, sizeof(buf), 0);
> + memset(cmd, 0, sizeof(cmd));
> + memset(buf, 0, sizeof(buf));
> cmd[0] = READ_CAPACITY;
>
> memset(&io_header, 0, sizeof(io_header));
>
>
>
>
prev parent reply other threads:[~2008-09-22 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 14:52 [Qemu-devel] [PATCH] scsi-generic: correct usage of memset() Laurent Vivier
2008-09-22 15:27 ` Anthony Liguori [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=48D7B951.9010802@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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).