From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkGyO-0004b8-DE for qemu-devel@nongnu.org; Thu, 08 Oct 2015 15:35:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkGyN-0006GD-I8 for qemu-devel@nongnu.org; Thu, 08 Oct 2015 15:35:28 -0400 From: Thomas Huth Date: Thu, 8 Oct 2015 21:35:13 +0200 Message-Id: <1444332916-16476-3-git-send-email-thuth@redhat.com> In-Reply-To: <1444332916-16476-1-git-send-email-thuth@redhat.com> References: <1444332916-16476-1-git-send-email-thuth@redhat.com> Subject: [Qemu-devel] [PATCH 2/5] hw/scsi/spapr_vscsi: Remove superfluous memset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini , Alexander Graf , David Gibson g_malloc0 already clears the memory, so no need for the additional memset here. Cc: Paolo Bonzini Cc: David Gibson Cc: Alexander Graf Signed-off-by: Thomas Huth --- 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) { -- 1.8.3.1