1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

common: Add log_assert.

* common/logging.h (log_assert): New macro.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
Neal H. Walfield 2016-02-23 21:14:21 +01:00
parent 33ac735a78
commit f57a91afb6

View File

@ -81,6 +81,10 @@ void log_logv (int level, const char *fmt, va_list arg_ptr);
void log_string (int level, const char *string);
#define log_assert(expr) \
do \
if (! (expr)) log_bug ("Assertion " #expr " failed.\n"); \
while (0)
void log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
void log_fatal (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
void log_error (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2);