* [Qemu-devel] [5291] scsi-generic: correct usage of memset() (Laurent Vivier)
@ 2008-09-22 15:27 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-09-22 15:27 UTC (permalink / raw)
To: qemu-devel
Revision: 5291
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5291
Author: aliguori
Date: 2008-09-22 15:27:54 +0000 (Mon, 22 Sep 2008)
Log Message:
-----------
scsi-generic: correct usage of memset() (Laurent Vivier)
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.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/hw/scsi-generic.c
Modified: trunk/hw/scsi-generic.c
===================================================================
--- trunk/hw/scsi-generic.c 2008-09-22 15:04:31 UTC (rev 5290)
+++ trunk/hw/scsi-generic.c 2008-09-22 15:27:54 UTC (rev 5291)
@@ -548,8 +548,8 @@
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));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-22 15:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 15:27 [Qemu-devel] [5291] scsi-generic: correct usage of memset() (Laurent Vivier) Anthony Liguori
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).