and bb_calloc() calls to bb_xzalloc() which allocates prezeroed memory but
only takes one argument (the size).
* to have the prototypes here unconditionally. */
extern void *xmalloc(size_t size);
extern void *xrealloc(void *old, size_t size);
+extern void *xzalloc(size_t size);
extern void *xcalloc(size_t nmemb, size_t size);
extern char *bb_xstrdup (const char *s);
}
#endif
+#ifdef L_xzalloc
+void *xzalloc(size_t size)
+{
+ void *ptr = xmalloc(size);
+ memset(ptr, 0, size);
+ return ptr;
+}
+#endif
+
#ifdef L_xcalloc
void *xcalloc(size_t nmemb, size_t size)
{