diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2024-01-14 10:45:59 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2024-01-15 14:07:16 -0300 |
commit | a8abb78009fb5797d4116619809bce5bc220b014 (patch) | |
tree | dec867fa51b70e4bf91e1bf46ee4ee379d74d017 /src/include/common.h | |
parent | build(deps): bump github/codeql-action from 3.22.12 to 3.23.0 (diff) | |
download | firejail-a8abb78009fb5797d4116619809bce5bc220b014.tar.gz firejail-a8abb78009fb5797d4116619809bce5bc220b014.tar.zst firejail-a8abb78009fb5797d4116619809bce5bc220b014.zip |
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.
Diffstat (limited to 'src/include/common.h')
-rw-r--r-- | src/include/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ | |||
41 | 41 | ||
42 | #define errExit(msg) do { \ | 42 | #define errExit(msg) do { \ |
43 | char msgout[500]; \ | 43 | char msgout[500]; \ |
44 | snprintf(msgout, 500, "Error %s/%s:%d %s(): %s", \ | 44 | snprintf(msgout, 500, "Error %s/%s:%d: %s: %s", \ |
45 | MOD_DIR, __FILE__, __LINE__, __func__, msg); \ | 45 | MOD_DIR, __FILE__, __LINE__, __func__, msg); \ |
46 | perror(msgout); \ | 46 | perror(msgout); \ |
47 | exit(1); \ | 47 | exit(1); \ |