qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/5] hw/dma/pxa2xx: Remove superfluous memset


From: Thomas Huth
Subject: [Qemu-devel] [PATCH 1/5] hw/dma/pxa2xx: Remove superfluous memset
Date: Thu, 8 Oct 2015 21:35:12 +0200

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

Signed-off-by: Thomas Huth <address@hidden>
---
 hw/dma/pxa2xx_dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c
index d4501fb..3f0a720 100644
--- a/hw/dma/pxa2xx_dma.c
+++ b/hw/dma/pxa2xx_dma.c
@@ -461,7 +461,6 @@ static int pxa2xx_dma_init(SysBusDevice *sbd)
 
     s->chan = g_malloc0(sizeof(PXA2xxDMAChannel) * s->channels);
 
-    memset(s->chan, 0, sizeof(PXA2xxDMAChannel) * s->channels);
     for (i = 0; i < s->channels; i ++)
         s->chan[i].state = DCSR_STOPINTR;
 
-- 
1.8.3.1




reply via email to

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