add prefix to reported errors
This commit is contained in:
parent
6372fee410
commit
6dfe33b4f1
2
util.c
2
util.c
@ -6,6 +6,8 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
COLD noreturn void fatal_error(const char *s) {
|
COLD noreturn void fatal_error(const char *s) {
|
||||||
|
const char *prefix = "fatal allocator error: ";
|
||||||
|
write(STDERR_FILENO, prefix, strlen(prefix));
|
||||||
write(STDERR_FILENO, s, strlen(s));
|
write(STDERR_FILENO, s, strlen(s));
|
||||||
write(STDERR_FILENO, "\n", 1);
|
write(STDERR_FILENO, "\n", 1);
|
||||||
abort();
|
abort();
|
||||||
|
Loading…
Reference in New Issue
Block a user