diff options
author | Markos Fountoulakis <44345837+mfundul@users.noreply.github.com> | 2020-06-16 21:57:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 21:57:46 +0300 |
commit | ed2d5542cc6000d80a7d4377435cc175cfd519e4 (patch) | |
tree | 4f823c068cc87f10b00c64d02e3b56de1255b84c /libnetdata | |
parent | 36d5e40dca91a93963e4d96f07af3e38803615d0 (diff) |
Replace assert calls (#9349)
* Replace all assert() calls with the new fatal_assert() for proper logging.
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/log/log.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libnetdata/log/log.h b/libnetdata/log/log.h index 8b54f28de1..1d32cf2091 100644 --- a/libnetdata/log/log.h +++ b/libnetdata/log/log.h @@ -89,6 +89,7 @@ static inline void debug_dummy(void) {} #define infoerr(args...) error_int("INFO", __FILE__, __FUNCTION__, __LINE__, ##args) #define error(args...) error_int("ERROR", __FILE__, __FUNCTION__, __LINE__, ##args) #define fatal(args...) fatal_int(__FILE__, __FUNCTION__, __LINE__, ##args) +#define fatal_assert(expr) ((expr) ? (void)(0) : fatal_int(__FILE__, __FUNCTION__, __LINE__, "Assertion `%s' failed", #expr)) extern void send_statistics(const char *action, const char *action_result, const char *action_data); extern void debug_int( const char *file, const char *function, const unsigned long line, const char *fmt, ... ) PRINTFLIKE(4, 5); |