mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
debug: make use of log_msg() in fatal_error() and bug() functions
Instead of writing directly to stderr and/or syslog(3).
This commit is contained in:
parent
e19db15104
commit
7656744877
3 changed files with 13 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue