diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-07-28 15:14:45 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-07-28 15:14:45 +0000 |
commit | 501c88b245fdc63f3f2a044fd7704bb468db3904 (patch) | |
tree | 3fff440532d8d380ae7e4f2933bc7163360f8279 /utility.c | |
parent | 6a99aaf0208151b7f5e5058efaa409496e2b7c4b (diff) | |
download | busybox-w32-501c88b245fdc63f3f2a044fd7704bb468db3904.tar.gz busybox-w32-501c88b245fdc63f3f2a044fd7704bb468db3904.tar.bz2 busybox-w32-501c88b245fdc63f3f2a044fd7704bb468db3904.zip |
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) | |||
1465 | return ptr; | 1465 | return ptr; |
1466 | } | 1466 | } |
1467 | 1467 | ||
1468 | void *xrealloc(void *old, size_t size) | 1468 | extern void *xrealloc(void *old, size_t size) |
1469 | { | 1469 | { |
1470 | void *ptr = realloc(old, size); | 1470 | void *ptr = realloc(old, size); |
1471 | if (!ptr) | 1471 | if (!ptr) |
1472 | fatalError(memory_exhausted); | 1472 | fatalError(memory_exhausted); |
1473 | return ptr; | 1473 | return ptr; |
1474 | } | 1474 | } |
1475 | |||
1476 | extern void *xcalloc(size_t nmemb, size_t size) | ||
1477 | { | ||
1478 | void *ptr = calloc(nmemb, size); | ||
1479 | if (!ptr) | ||
1480 | fatalError(memory_exhausted); | ||
1481 | return ptr; | ||
1482 | } | ||
1475 | #endif | 1483 | #endif |
1476 | 1484 | ||
1477 | #if defined BB_FEATURE_NFSMOUNT | 1485 | #if defined BB_FEATURE_NFSMOUNT |