fixup last commit
This commit is contained in:
parent
1636ff8c49
commit
9fcc42d6ab
34
util.h
34
util.h
@ -33,35 +33,41 @@ void weprintf (const char *fmt, ...);
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
#define brandt_assert(expr) ((expr) ? (void)(0) : \
|
||||
eprintf("Assertion failed in file %s line %d function %s: %s", \
|
||||
#define brandt_assert(expr) do { \
|
||||
(expr) ? (void)(0) : eprintf ( \
|
||||
"Assertion failed in file %s line %d function %s: %s", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
__PRETTY_FUNCTION__, \
|
||||
(#expr)))
|
||||
(# expr)); \
|
||||
} while (0)
|
||||
|
||||
#define brandt_assert_perror(errnum) (!(errnum) ? (void)(0) : \
|
||||
eprintf("Assertion failed in file %s line %d function %s:", \
|
||||
#define brandt_assert_perror(errnum) do { \
|
||||
!(errnum) ? (void)(0) : eprintf ( \
|
||||
"Assertion failed in file %s line %d function %s:", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
__PRETTY_FUNCTION__))
|
||||
__PRETTY_FUNCTION__); \
|
||||
} while (0)
|
||||
|
||||
#define brandt_assert_gpgerr(errnum) (!(errnum) ? (void)(0) : \
|
||||
eprintf("Assertion failed in file %s line %d function %s: %s", \
|
||||
#define brandt_assert_gpgerr(errnum) do { \
|
||||
!(errnum) ? (void)(0) : eprintf ( \
|
||||
"Assertion failed in file %s line %d function %s: %s", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
__PRETTY_FUNCTION__, \
|
||||
gcry_strerror((errnum))))
|
||||
gcry_strerror ((errnum))); \
|
||||
} while (0)
|
||||
|
||||
#define DP(point) ((void)(gcry_log_debugpnt (#point, point, ec_ctx)))
|
||||
#define DM(mpi) ((void)(gcry_log_debugmpi (#mpi, mpi, ec_ctx)))
|
||||
#define DP(point) ((void)(gcry_log_debugpnt (# point, point, ec_ctx)))
|
||||
#define DM(mpi) ((void)(gcry_log_debugmpi (# mpi, mpi, ec_ctx)))
|
||||
|
||||
#else
|
||||
#else /* ifdef NDEBUG */
|
||||
|
||||
#define brandt_assert(expr) ((void)(expr))
|
||||
#define brandt_assert_perror(errnum) ((void)(errnum))
|
||||
#define brandt_assert_gpgerr(errnum) ((void)(errnum))
|
||||
|
||||
#endif
|
||||
#endif /* ifdef NDEBUG */
|
||||
|
||||
#endif
|
||||
#endif /* ifndef _BRANDT_UTIL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user