diff options
Diffstat (limited to 'src/history.c')
| -rw-r--r-- | src/history.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/history.c b/src/history.c index f9426f1..d11e106 100644 --- a/src/history.c +++ b/src/history.c @@ -3,7 +3,6 @@ #include "history.h" #include "util.h" -#include <err.h> #include <string.h> static struct inputln *history_list_prev( @@ -140,7 +139,7 @@ inputln_alloc(void) struct inputln *ln; ln = malloc(sizeof(struct inputln)); - if (!ln) err(1, "malloc"); + if (!ln) ERROR(SYSTEM, "malloc"); inputln_init(ln); return ln; @@ -160,7 +159,7 @@ inputln_resize(struct inputln *ln, size_t size) ln->cap = size; ln->buf = realloc(ln->buf, ln->cap * sizeof(char)); - if (!ln->buf) err(1, "realloc"); + if (!ln->buf) ERROR(SYSTEM, "realloc"); ln->len = MIN(ln->len, ln->cap-1); ln->buf[ln->len] = '\0'; } |
