mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
hw/scsi/spapr_vscsi: Remove superfluous memset
g_malloc0 already clears the memory, so no need for the additional memset here. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
185181f883
commit
a23dec105c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user