qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PULL 08/21] hw/scsi/spapr_vscsi: Remove superfluous memset


From: David Gibson
Subject: [Qemu-ppc] [PULL 08/21] hw/scsi/spapr_vscsi: Remove superfluous memset
Date: Fri, 23 Oct 2015 20:43:20 +1100

From: Thomas Huth <address@hidden>

g_malloc0 already clears the memory, so no need for
the additional memset here.

Cc: Paolo Bonzini <address@hidden>
Cc: David Gibson <address@hidden>
Cc: Alexander Graf <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
 hw/scsi/spapr_vscsi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 891424f..f4f5140 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -750,7 +750,6 @@ static void vscsi_report_luns(VSCSIState *s, vscsi_req *req)
     len = n+8;
 
     resp_data = g_malloc0(len);
-    memset(resp_data, 0, len);
     stl_be_p(resp_data, n);
     i = found_lun0 ? 8 : 16;
     QTAILQ_FOREACH(kid, &s->bus.qbus.children, sibling) {
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]