A pending item in my tree I might as well check in: I plan to migrate calloc() and bb_calloc() calls to bb_xzalloc() which allocates prezeroed memory but only takes one argument (the size).
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -183,6 +183,7 @@ void run_applet_by_name(const char *name, int argc, char **argv); | |
| * 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); | |
| @@ -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) | |
| { | |