diff options
author | Eric Andersen | 2000-07-28 15:14:45 +0000 |
---|---|---|
committer | Eric Andersen | 2000-07-28 15:14:45 +0000 |
commit | 501c88b245fdc63f3f2a044fd7704bb468db3904 (patch) | |
tree | 3fff440532d8d380ae7e4f2933bc7163360f8279 /utility.c | |
parent | 6a99aaf0208151b7f5e5058efaa409496e2b7c4b (diff) | |
download | busybox-501c88b245fdc63f3f2a044fd7704bb468db3904.zip busybox-501c88b245fdc63f3f2a044fd7704bb468db3904.tar.gz |
More sh updates (with related changes to everything else). Switched
to using getopt and cleaned up the resulting mess. if-then-else-fi
is now basically working (given a bunch of constraints).
-Erik
Diffstat (limited to 'utility.c')
-rw-r--r-- | utility.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1465,13 +1465,21 @@ extern void *xmalloc(size_t size) return ptr; } -void *xrealloc(void *old, size_t size) +extern void *xrealloc(void *old, size_t size) { void *ptr = realloc(old, size); if (!ptr) fatalError(memory_exhausted); return ptr; } + +extern void *xcalloc(size_t nmemb, size_t size) +{ + void *ptr = calloc(nmemb, size); + if (!ptr) + fatalError(memory_exhausted); + return ptr; +} #endif #if defined BB_FEATURE_NFSMOUNT |