/*
 * $Id$
 */

#include <errno.h>
#include <time.h>

/* from libvarnish/argv.c */
void FreeArgv(char **argv);
char **ParseArgv(const char *s, int comment);

/* from libvarnish/time.c */
void TIM_format(time_t t, char *p);
time_t TIM_parse(const char *p);

/* from libvarnish/version.c */
void varnish_version(const char *);

/* from libvarnish/assert.c */
#ifdef WITHOUT_ASSERTS
#define assert(e)	((void)0)
#else /* WITH_ASSERTS */
#define assert(e)							\
do { 									\
	if (!(e))							\
		lbv_assert(__func__, __FILE__, __LINE__, #e, errno);	\
} while (0)
#endif

void lbv_assert(const char *, const char *, int, const char *, int);

/* Assert zero return value */
#define AZ(foo)	do { assert((foo) == 0); } while (0)

/*
 * $Id$
 */

#include <errno.h>
#include <time.h>

/* from libvarnish/argv.c */
void FreeArgv(char **argv);
char **ParseArgv(const char *s, int comment);

/* from libvarnish/time.c */
void TIM_format(time_t t, char *p);
time_t TIM_parse(const char *p);

/* from libvarnish/version.c */
void varnish_version(const char *);

/* from libvarnish/assert.c */
#ifdef WITHOUT_ASSERTS
#define assert(e)	((void)0)
#else /* WITH_ASSERTS */
#define assert(e)							\
do { 									\
	if (e)								\
		lbv_assert(__func__, __FILE__, __LINE__, #e, errno);	\
} while (0)
#endif

void lbv_assert(const char *, const char *, int, const char *, int);

/* Assert zero return value */
#define AZ(foo)	do { assert((foo) == 0); } while (0)

--- 
+++ 
@@ -22,7 +22,7 @@
 #else /* WITH_ASSERTS */
 #define assert(e)							\
 do { 									\
-	if (e)								\
+	if (!(e))							\
 		lbv_assert(__func__, __FILE__, __LINE__, #e, errno);	\
 } while (0)
 #endif
Make assert do the right thing


git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@745 d4fa192b-c00b-0410-8231-f00ffab90ce4
