From 6e46ec6b9cdc3bd7dbc8144505ea04d9b93a5cd9 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 20 Jun 2008 14:47:16 +0200 Subject: [PATCH] src/common.c: Not enough memory is an error, not a debug message! --- src/common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common.c b/src/common.c index 56fa6962..82b4aaae 100644 --- a/src/common.c +++ b/src/common.c @@ -70,12 +70,12 @@ char *sstrdup (const char *s) if((r = strdup (s)) == NULL) { - DEBUG ("Not enough memory."); - exit(3); + ERROR ("Not enough memory."); + exit (3); } return (r); -} +} /* char *sstrdup */ /* Even though Posix requires "strerror_r" to return an "int", * some systems (e.g. the GNU libc) return a "char *" _and_ @@ -131,12 +131,12 @@ void *smalloc (size_t size) if ((r = malloc (size)) == NULL) { - DEBUG("Not enough memory."); - exit(3); + ERROR ("Not enough memory."); + exit (3); } - return r; -} + return (r); +} /* void *smalloc */ #if 0 void sfree (void **ptr) -- 2.30.2