aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-01 01:38:48 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-10-01 09:29:44 +0300
commita25a7e66a277c0637d6c210a1f59564ac5359863 (patch)
treeecb285cd6d5f58d8ad6063260686720637705778 /include
parentb1270a3331f68948b33581623dfdcadbf72a046b (diff)
mtd-utils: introduce xzalloc() helper
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'include')
-rw-r--r--include/xalloc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/xalloc.h b/include/xalloc.h
index d49a1ae..35a94af 100644
--- a/include/xalloc.h
+++ b/include/xalloc.h
@@ -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);