Skip to contentSkip to conversation

mtd-utils: introduce xzalloc() helper

PATCH New Mike Frysinger 1 participant 1 message Oct 1, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd-utils: introduce xzalloc() helper

---
 include/xalloc.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
include/xalloc.h +6 -0
index d49a1ae..35a94af 100644
@@ -56,6 +56,12 @@ static void *xcalloc(size_t nmemb, size_t size)
 }
 
 __attribute__((unused))
+static void *xzalloc(size_t size)
+{
+	return xcalloc(1, size);
+}
+
+__attribute__((unused))
 static void *xrealloc(void *ptr, size_t size)
 {
 	ptr = realloc(ptr, size);
Signature · 1 line
1.7.3.1