From 2fdb3fc0b67757afd6fe7a244b6e14d2a546af0e Mon Sep 17 00:00:00 2001 From: graham.gower Date: Tue, 08 Dec 2009 20:20:03 -0500 Subject: Merge commit 'grg' into HEAD git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libbb/xfuncs.c') 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; } -- cgit v0.9.1