summaryrefslogtreecommitdiff
path: root/macros.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-12 08:49:10 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-12 08:49:10 -0400
commit08881ad97e49a619d52dede77c18d69c02d3d150 (patch)
tree623cb2fbbddfd58c5ddca9e3c823819d1740f0fc /macros.h
parent74ad46535b87acec38f0a76070d3caf0e9986b6d (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.h10
1 files changed, 1 insertions, 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