From a8abb78009fb5797d4116619809bce5bc220b014 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 14 Jan 2024 10:45:59 -0300 Subject: modif: Change errExit msg format to match assert Make it more similar to the assert() message format for consistency. Example: Before: firejail: main.c:100: main: Assertion `1 == 2' failed. Error src/firecfg/main.c:100 main(): malloc: Cannot allocate memory After: firejail: main.c:100: main: Assertion `1 == 2' failed. Error src/firecfg/main.c:100: main: malloc: Cannot allocate memory This amends commit b963fe41a ("Improve errExit error messages", 2023-06-16) / PR #5871. --- src/include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/common.h b/src/include/common.h index c9ec7b729..03a71967b 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -41,7 +41,7 @@ #define errExit(msg) do { \ char msgout[500]; \ - snprintf(msgout, 500, "Error %s/%s:%d %s(): %s", \ + snprintf(msgout, 500, "Error %s/%s:%d: %s: %s", \ MOD_DIR, __FILE__, __LINE__, __func__, msg); \ perror(msgout); \ exit(1); \ -- cgit v1.2.3-70-g09d2