projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46b9934
)
Revert "core: remove redundant zalloc() definition"
author
H. Peter Anvin
<hpa@linux.intel.com>
Thu, 15 Dec 2011 18:47:41 +0000
(10:47 -0800)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Thu, 15 Dec 2011 18:47:41 +0000
(10:47 -0800)
This reverts commit
46b993449264a2332427a165b4c77e400a053178
.
Build failure was due to a non-clean tree.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core/mem/malloc.c
patch
|
blob
|
history
diff --git
a/core/mem/malloc.c
b/core/mem/malloc.c
index
fa3c395
..
d27fc27
100644
(file)
--- a/
core/mem/malloc.c
+++ b/
core/mem/malloc.c
@@
-201,3
+201,14
@@
void *realloc(void *ptr, size_t size)
}
}
}
+
+void *zalloc(size_t size)
+{
+ void *ptr;
+
+ ptr = malloc(size);
+ if (ptr)
+ memset(ptr, 0, size);
+
+ return ptr;
+}