diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-08 20:20:03 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-08 20:20:03 (EST) |
commit | 2fdb3fc0b67757afd6fe7a244b6e14d2a546af0e (patch) | |
tree | a5e28a26a07e429a753f29945cc8ba9c4f6c9884 /libbb/xfuncs.c | |
parent | e4a49209222ea7385f64e9336425df115a3ea1a3 (diff) |
Merge commit 'grg' into HEAD
git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index c12b282..4374048 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -30,7 +30,7 @@ extern void *xmalloc(size_t size) { void *ptr = malloc(size); if (ptr == NULL && size != 0) - error_msg_and_die(memory_exhausted); + perror_msg_and_die("malloc"); return ptr; } @@ -38,7 +38,7 @@ extern void *xrealloc(void *ptr, size_t size) { ptr = realloc(ptr, size); if (ptr == NULL && size != 0) - error_msg_and_die(memory_exhausted); + perror_msg_and_die("realloc"); return ptr; } @@ -46,7 +46,7 @@ extern void *xcalloc(size_t nmemb, size_t size) { void *ptr = calloc(nmemb, size); if (ptr == NULL && nmemb != 0 && size != 0) - error_msg_and_die(memory_exhausted); + perror_msg_and_die("calloc"); return ptr; } @@ -59,7 +59,7 @@ extern char * xstrdup (const char *s) { t = strdup (s); if (t == NULL) - error_msg_and_die(memory_exhausted); + perror_msg_and_die("strdup"); return t; } |