mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-10 13:04:23 +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:
parent
33ac735a78
commit
f57a91afb6
@ -81,6 +81,10 @@ void log_logv (int level, const char *fmt, va_list arg_ptr);
|
|||||||
void log_string (int level, const char *string);
|
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_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
|
||||||
void log_fatal (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);
|
void log_error (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user