fix bug in util
This commit is contained in:
parent
9e9b786819
commit
5dbbef588d
12
util.h
12
util.h
@ -32,12 +32,6 @@ void weprintf(const char *fmt, ...);
|
|||||||
|
|
||||||
#ifdef NDEBUG
|
#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) : \
|
# define brandt_assert(expr) ((expr) ? (void)(0) : \
|
||||||
eprintf("Assertion failed in file %s line %d function %s: %s", __FILE__, __LINE__, __PRETTY_FUNCTION__, (#expr)))
|
eprintf("Assertion failed in file %s line %d function %s: %s", __FILE__, __LINE__, __PRETTY_FUNCTION__, (#expr)))
|
||||||
# define brandt_assert_perror(errnum) (!(errnum) ? (void)(0) : \
|
# 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) : \
|
# 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))))
|
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
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user