diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-06-16 15:38:22 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-06-28 03:43:56 -0300 |
commit | 1989a0f46ad11a235d6788f7fbed880cd02aad19 (patch) | |
tree | 304abfc44451e2f812615cc4844adf42f2b9d22b /src | |
parent | Deduplicate calls similar to errExit (diff) | |
download | firejail-1989a0f46ad11a235d6788f7fbed880cd02aad19.tar.gz firejail-1989a0f46ad11a235d6788f7fbed880cd02aad19.tar.zst firejail-1989a0f46ad11a235d6788f7fbed880cd02aad19.zip |
common.h: line-wrap errExit
Diffstat (limited to 'src')
-rw-r--r-- | src/include/common.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/common.h b/src/include/common.h index a0ad8c765..060945f82 100644 --- a/src/include/common.h +++ b/src/include/common.h | |||
@@ -35,8 +35,12 @@ | |||
35 | // dbus proxy path used by firejail and firemon | 35 | // dbus proxy path used by firejail and firemon |
36 | #define XDG_DBUS_PROXY_PATH "/usr/bin/xdg-dbus-proxy" | 36 | #define XDG_DBUS_PROXY_PATH "/usr/bin/xdg-dbus-proxy" |
37 | 37 | ||
38 | 38 | #define errExit(msg) do { \ | |
39 | #define errExit(msg) do { char msgout[500]; snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __FUNCTION__); perror(msgout); exit(1);} while (0) | 39 | char msgout[500]; \ |
40 | snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __FUNCTION__); \ | ||
41 | perror(msgout); \ | ||
42 | exit(1); \ | ||
43 | } while (0) | ||
40 | 44 | ||
41 | // macro to print ip addresses in a printf statement | 45 | // macro to print ip addresses in a printf statement |
42 | #define PRINT_IP(A) \ | 46 | #define PRINT_IP(A) \ |