From 5dbbef588dc7247570c9c5f9797b38d907313288 Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Tue, 28 Jun 2016 16:21:13 +0200 Subject: [PATCH] fix bug in util --- util.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util.h b/util.h index 9be0b62..6d4a72f 100644 --- a/util.h +++ b/util.h @@ -32,12 +32,6 @@ void weprintf(const char *fmt, ...); #ifdef NDEBUG -# define brandt_assert(expr) ((void)(expr)) -# define brandt_assert_perror(errnum) ((void)(errnum)) -# define brandt_assert_gpgerr(errnum) ((void)(errnum)) - -#else - # define brandt_assert(expr) ((expr) ? (void)(0) : \ eprintf("Assertion failed in file %s line %d function %s: %s", __FILE__, __LINE__, __PRETTY_FUNCTION__, (#expr))) # define brandt_assert_perror(errnum) (!(errnum) ? (void)(0) : \ @@ -45,6 +39,12 @@ eprintf("Assertion failed in file %s line %d function %s:", __FILE__, __LINE__, # define brandt_assert_gpgerr(errnum) (!(errnum) ? (void)(0) : \ eprintf("Assertion failed in file %s line %d function %s: %s", __FILE__, __LINE__, __PRETTY_FUNCTION__, gcry_strerror((errnum)))) +#else + +# define brandt_assert(expr) ((void)(expr)) +# define brandt_assert_perror(errnum) ((void)(errnum)) +# define brandt_assert_gpgerr(errnum) ((void)(errnum)) + #endif #endif