diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-28 13:23:45 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-28 13:24:00 +0200 |
commit | 34c0fd8f36269699b75e0aaf841911b5ae06246e (patch) | |
tree | 29cded18fde2cede51008b811713ef5c497f53db /envreallocn.c | |
parent | Add tests for allocation functions (diff) | |
download | libsimple-34c0fd8f36269699b75e0aaf841911b5ae06246e.tar.gz libsimple-34c0fd8f36269699b75e0aaf841911b5ae06246e.tar.bz2 libsimple-34c0fd8f36269699b75e0aaf841911b5ae06246e.tar.xz |
Simplify en* functions, and handle argv0 == NULL correct
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | envreallocn.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/envreallocn.c b/envreallocn.c index 44b69e3..1956933 100644 --- a/envreallocn.c +++ b/envreallocn.c @@ -3,17 +3,12 @@ #ifndef TEST -extern char *argv0; - - void * libsimple_envreallocn(int status, void *ptr, size_t n, va_list ap) /* TODO test */ { void *ret = libsimple_vreallocn(ptr, n, ap); - if (!ret) { - fprintf(stderr, "%s: realloc: %s\n", argv0, strerror(errno)); - exit(status); - } + if (!ret) + enprintf(status, "realloc:"); return ret; } |