[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace callo
From: |
Pavel Vasilyev |
Subject: |
[Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace calloc() instead malloc() |
Date: |
Wed, 28 Jan 2009 21:44:46 +0300 |
User-agent: |
KMail/1.9.10 |
May be this better?
--- qemu-malloc.c Base (BASE)
+++ qemu-malloc.c Locally Modified (Based On LOCAL)
@@ -46,10 +46,9 @@
void *(size_t size)
{
void *ptr;
- ptr = qemu_malloc(size);
+ ptr = calloc(1, size);
if (!ptr)
return NULL;
- memset(ptr, 0, size);
return ptr;
}
signature.asc
Description: This is a digitally signed message part.