diff options
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index fa6aa0f..d3c9e41 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -37,6 +37,15 @@ void *xrealloc(void *ptr, size_t size) } #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) { |