modif: Change errExit msg format to match assert

Make it more similar to the assert() message format for consistency.
Example:

Before:

    firejail: main.c💯 main: Assertion `1 == 2' failed.
    Error src/firecfg/main.c:100 main(): malloc: Cannot allocate memory

After:

    firejail: main.c💯 main: Assertion `1 == 2' failed.
    Error src/firecfg/main.c💯 main: malloc: Cannot allocate memory

This amends commit b963fe41a ("Improve errExit error messages",
2023-06-16) / PR #5871.
This commit is contained in:
Kelvin M. Klann 2024-01-14 10:45:59 -03:00
parent 22c728b508
commit a8abb78009

View file

@ -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); \