From ab07cc3188da8ba1a449fde831741a00bb329bef Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Tue, 12 Oct 2010 14:02:46 +0300 Subject: [PATCH] logging: fix die(), again --- test/compile.c | 1 + usual/logging.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/compile.c b/test/compile.c index 5b1b3b9..6a61408 100644 --- a/test/compile.c +++ b/test/compile.c @@ -51,6 +51,7 @@ int main(void) md5_reset(&md5); strlcpy(buf, "foo", sizeof(buf)); printf("xmalloc: %p\n", xmalloc(128)); + if (0) die("0"); return 0; } diff --git a/usual/logging.h b/usual/logging.h index 1a36b33..c6ea4ac 100644 --- a/usual/logging.h +++ b/usual/logging.h @@ -153,7 +153,7 @@ void log_fatal(const char *file, int line, const char *func, bool show_perror, /** Less verbose fatal() */ #define die(fmt, args...) do { LOG_CONTEXT_DEF; \ - log_generic(LG_FATAL, LOG_CONTEXT, ## args); \ + log_generic(LG_FATAL, LOG_CONTEXT, fmt, ## args); \ exit(1); } while (0) /** -- 2.39.5