From: Gerald Carter Date: Sat, 16 Apr 2005 20:48:04 +0000 (+0000) Subject: r6358: merging SMB_ASSERT() changes from the release branch X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~4934 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70178d5d27900d56ad1da3c99f3a63d863fb324c;p=thirdparty%2Fsamba.git r6358: merging SMB_ASSERT() changes from the release branch --- diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 04616eb8abe..6d1e382bb82 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -66,9 +66,16 @@ #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) /* assert macros */ -#define SMB_ASSERT(b) ((b)?(void)0: \ +#ifdef DEVELOPER +#define SMB_ASSERT(b) ( (b) ? (void)0 : \ (DEBUG(0,("PANIC: assert failed at %s(%d)\n", \ __FILE__, __LINE__)), smb_panic("assert failed"))) +#else +/* redefine the assert macro for non-developer builds */ +#define SMB_ASSERT(b) ( (b) ? (void)0 : \ + (DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__)))) +#endif + #define SMB_ASSERT_ARRAY(a,n) SMB_ASSERT((sizeof(a)/sizeof((a)[0])) >= (n)) /* these are useful macros for checking validity of handles */