aboutsummaryrefslogtreecommitdiff
path: root/osdep.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-14 21:41:12 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-14 21:41:12 +0000
commit07d898662d9aa173ac2d5c0aa4c9a1cf39caa703 (patch)
tree65e205bed7c596cd47d886fc2f0b77e81827962b /osdep.c
parentcaed880216f3572b5f33691f46c934e1d0faccb2 (diff)
added qemu_mallocz()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@660 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'osdep.c')
-rw-r--r--osdep.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/osdep.c b/osdep.c
index d4d336462e..f843e562f1 100644
--- a/osdep.c
+++ b/osdep.c
@@ -281,6 +281,16 @@ void *qemu_malloc(size_t size)
#endif
+void *qemu_mallocz(size_t size)
+{
+ void *ptr;
+ ptr = qemu_malloc(size);
+ if (!ptr)
+ return NULL;
+ memset(ptr, 0, size);
+ return ptr;
+}
+
/****************************************************************/
/* printf support */