aboutsummaryrefslogtreecommitdiff
path: root/xmalloc.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-02-09 12:32:33 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2021-02-09 12:32:33 +0000
commit7656744877f55658c205b1c5d2bf76651def10b2 (patch)
treef93bd378247a2e0e678de1eb98678a95dac96c11 /xmalloc.c
parentrender: use portable HAS_INCLUDE() wrapper instead of __has_include() (diff)
debug: make use of log_msg() in fatal_error() and bug() functions
Instead of writing directly to stderr and/or syslog(3).
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 16b3565a..28af50f9 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -11,7 +11,7 @@ static void *
check_alloc(void *alloc)
{
if (unlikely(alloc == NULL)) {
- fatal_error(__func__, ENOMEM);
+ FATAL_ERROR(__func__, ENOMEM);
}
return alloc;
}
@@ -64,7 +64,7 @@ xvasprintf_(char **strp, const char *format, va_list ap)
va_copy(ap2, ap);
int n = vsnprintf(NULL, 0, format, ap2);
if (unlikely(n < 0)) {
- fatal_error("vsnprintf", EILSEQ);
+ FATAL_ERROR("vsnprintf", EILSEQ);
}
va_end(ap2);
*strp = xmalloc(n + 1);