From: Todd C. Miller Date: Sat, 15 Mar 2003 20:10:42 +0000 (+0000) Subject: make the malloc(0) error specific to each function to aid tracking down X-Git-Tag: SUDO_1_6_7~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb2c3323d95e1749eddeea2d2ed19ae4fccb2911;p=sudo make the malloc(0) error specific to each function to aid tracking down bugs. --- diff --git a/alloc.c b/alloc.c index 63fcba27c..1b35f4b7a 100644 --- a/alloc.c +++ b/alloc.c @@ -94,7 +94,7 @@ emalloc(size) VOID *ptr; if (size == 0) { - (void) fprintf(stderr, "%s: internal error, tried to malloc(0)\n", + (void) fprintf(stderr, "%s: internal error, tried to emalloc(0)\n", Argv[0]); exit(1); } @@ -117,7 +117,7 @@ emalloc2(nmemb, size) VOID *ptr; if (nmemb == 0 || size == 0) { - (void) fprintf(stderr, "%s: internal error, tried to malloc(0)\n", + (void) fprintf(stderr, "%s: internal error, tried to emalloc2(0)\n", Argv[0]); exit(1); } @@ -146,7 +146,7 @@ erealloc(ptr, size) { if (size == 0) { - (void) fprintf(stderr, "%s: internal error, tried to realloc(0)\n", + (void) fprintf(stderr, "%s: internal error, tried to erealloc(0)\n", Argv[0]); exit(1); } @@ -172,7 +172,7 @@ erealloc3(ptr, nmemb, size) { if (nmemb == 0 || size == 0) { - (void) fprintf(stderr, "%s: internal error, tried to realloc(0)\n", + (void) fprintf(stderr, "%s: internal error, tried to erealloc3(0)\n", Argv[0]); exit(1); }