r6358: merging SMB_ASSERT() changes from the release branch
authorGerald Carter <jerry@samba.org>
Sat, 16 Apr 2005 20:48:04 +0000 (20:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:38 +0000 (10:56 -0500)
(This used to be commit 70178d5d27900d56ad1da3c99f3a63d863fb324c)

source3/include/smb_macros.h

index 04616eb8abe6739e3ee29bcf012b78bb50a6fd18..6d1e382bb8281b270ebb121fecc3c0d1414cc298 100644 (file)
 #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 */