aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-22 15:27:54 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-22 15:27:54 +0000
commit4f26a4867cf09fc486cd68a1e05a018767290260 (patch)
tree3cb9673c271d759a2bf2e3ef34795d48df46a6f5
parentac4ffb5a130d1304931999781b229e926babeae6 (diff)
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5291 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--hw/scsi-generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 3973c25800..88147b5df0 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -548,8 +548,8 @@ static int get_blocksize(BlockDriverState *bdrv)
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));