From 08881ad97e49a619d52dede77c18d69c02d3d150 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 12 Jun 2021 08:49:10 -0400 Subject: 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. --- macros.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/macros.h b/macros.h index 8b8267a..41dc81a 100644 --- a/macros.h +++ b/macros.h @@ -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 -- cgit v1.2.3-13-gbd6f