Commit ac7c76c1 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Many of our assertions have side effects, so the condition needs to be

evaluated even if we don't bother to check the result.  We should trust
the compiler to eliminate code that has no effect.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2272 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 42ac0a19
......@@ -669,7 +669,7 @@ Tlen(const txt t)
}
#ifdef WITHOUT_ASSERTS
#define spassert(cond) ((void)0)
#define spassert(cond) ((void)(cond))
#else
void panic(const char *, int, const char *,
const struct sess *, const char *, ...);
......
......@@ -63,7 +63,7 @@ int vtmpfile(char *);
*/
#ifdef WITHOUT_ASSERTS
#define assert(e) ((void)0)
#define assert(e) ((void)(e))
#else /* WITH_ASSERTS */
#define assert(e) \
do { \
......
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