X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fassert.h;h=ebf4d8c15b4eac6224415223754ba50459264ebd;hb=ac3f809c3c10347c110fac3db93af0954eda98bb;hp=e03baaaae87c66a5adc653f084be53591eee99a1;hpb=ad2651a3d8a2e2ae70a5ad882518ef346ab1bc7b;p=pdclib diff --git a/includes/assert.h b/includes/assert.h index e03baaa..ebf4d8c 100644 --- a/includes/assert.h +++ b/includes/assert.h @@ -4,7 +4,7 @@ // Public Domain C Library - http://pdclib.sourceforge.net // This code is Public Domain. Use, modify, and redistribute at will. // ---------------------------------------------------------------------------- -// Provides the debug macro assert(). +// Diagnostics // ---------------------------------------------------------------------------- #ifndef __ASSERT_H @@ -26,9 +26,9 @@ void __assert( char const * const expression, // the tested expression #undef assert #if defined NDEBUG -#define assert( x ) (void) 0 +#define assert( x ) ( (void) 0 ) #else -#define assert( x ) ( x ) ? (void) 0 \ +#define assert( x ) ( x ) ? ( (void) 0 ) \ : __assert( #x, __FILE__, __func__, __LINE__ ) #endif