From: Mike Frysinger Date: Fri, 1 Oct 2010 05:38:48 +0000 (-0400) Subject: mtd-utils: introduce xzalloc() helper X-Git-Tag: v1.4.2~44 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a25a7e66a277c0637d6c210a1f59564ac5359863;p=mtd-utils.git mtd-utils: introduce xzalloc() helper Signed-off-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- diff --git a/include/xalloc.h b/include/xalloc.h index d49a1ae..35a94af 100644 --- a/include/xalloc.h +++ b/include/xalloc.h @@ -55,6 +55,12 @@ static void *xcalloc(size_t nmemb, size_t size) return ptr; } +__attribute__((unused)) +static void *xzalloc(size_t size) +{ + return xcalloc(1, size); +} + __attribute__((unused)) static void *xrealloc(void *ptr, size_t size) {