aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index c667a1b..a871588 100644
--- a/src/util.c
+++ b/src/util.c
@@ -36,7 +36,7 @@ void *xmalloc(size_t size) {
assert(size > 0);
void *ptr = malloc(size);
if (!ptr)
- diem("Cannot allocate %zu bytes", size);
+ fatal("Cannot allocate %zu bytes", size);
return ptr;
}
@@ -44,7 +44,7 @@ void *xmalloc(size_t size) {
void *xrealloc(void *ptr, size_t size) {
assert(size > 0 && ptr);
if (!(ptr = realloc(ptr, size)))
- diem("Cannot reallocate %zu bytes", size);
+ fatal("Cannot reallocate %zu bytes", size);
return ptr;
}
@@ -52,7 +52,7 @@ void *xrealloc(void *ptr, size_t size) {
char *xstrdup(const char *str) {
assert(str);
if (!(str = strdup(str)))
- diem("Insufficient memory for string allocation");
+ fatal("Insufficient memory for string allocation");
return (char*) str;
}