diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-12 08:49:10 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-06-12 08:49:10 -0400 |
commit | 08881ad97e49a619d52dede77c18d69c02d3d150 (patch) | |
tree | 623cb2fbbddfd58c5ddca9e3c823819d1740f0fc /macros.h | |
parent | 74ad46535b87acec38f0a76070d3caf0e9986b6d (diff) |
Removed `did_fail`, and `did_fail_reason`, and added
`log_reason`.
I didn't realize just how unreadable the codebase
became, with those two macros.
Diffstat (limited to 'macros.h')
-rw-r--r-- | macros.h | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -2,13 +2,5 @@ #define MACROS_H #define log(priority, ...) syslog(priority, __VA_ARGS__) - -#define did_fail(cond, ...) {\ - if (cond) {\ - log(LOG_ERR, __VA_ARGS__); \ - return -1; \ - }\ -} - -#define did_fail_reason(cond, msg, ...) did_fail(cond, msg " Reason: %s", __VA_ARGS__) +#define log_reason(priority, msg, ...) log(priority, msg " Reason %s", __VA_ARGS__) #endif |