]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/i44fx-test: No need for zeroing memory before memset
authorThomas Huth <thuth@redhat.com>
Fri, 9 Oct 2015 15:56:37 +0000 (17:56 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 6 Nov 2015 12:42:38 +0000 (15:42 +0300)
Change a g_malloc0 into g_malloc since the following
memset fills the whole buffer anyway.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tests/i440fx-test.c

index d0bc8de25ab40be04f8ff04d0b409d1b64db4d25..7fa170990f1d3ebdf58314d0353b3f5dc0f8f077 100644 (file)
@@ -191,7 +191,7 @@ static void write_area(uint32_t start, uint32_t end, uint8_t value)
     uint32_t size = end - start + 1;
     uint8_t *data;
 
-    data = g_malloc0(size);
+    data = g_malloc(size);
     memset(data, value, size);
     memwrite(start, data, size);