aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-06-28 16:21:13 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-06-28 16:21:13 +0200
commit5dbbef588dc7247570c9c5f9797b38d907313288 (patch)
tree0aa11be43d294c71bdc39178fdfeecffae871473
parent9e9b78681981dbf08d52314f3d7b0ff7a3f51ac9 (diff)
fix bug in util
-rw-r--r--util.h12
1 files 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