Commit 27076a3e authored by Matt Stancliff's avatar Matt Stancliff
Browse files

Fix tests when assert() undefined

Closes #309

(such as when -DNDEBUG disables all assert() macros)

Inspired by keith-bennett-gbg, but re-rewritten to be more concise.
parent 6b122d43
......@@ -43,6 +43,13 @@ static long long usec(void) {
return (((long long)tv.tv_sec)*1000000)+tv.tv_usec;
}
/* The assert() calls below have side effects, so we need assert()
* even if we are compiling without asserts (-DNDEBUG). */
#ifdef NDEBUG
#undef assert
#define assert(e) (void)(e)
#endif
static redisContext *select_database(redisContext *c) {
redisReply *reply;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment