svn commit: samba r6358 - in branches/SAMBA_3_0/source/include: .
jerry at samba.org
jerry at samba.org
Sat Apr 16 20:48:05 GMT 2005
Author: jerry
Date: 2005-04-16 20:48:04 +0000 (Sat, 16 Apr 2005)
New Revision: 6358
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6358
Log:
merging SMB_ASSERT() changes from the release branch
Modified:
branches/SAMBA_3_0/source/include/smb_macros.h
Changeset:
Modified: branches/SAMBA_3_0/source/include/smb_macros.h
===================================================================
--- branches/SAMBA_3_0/source/include/smb_macros.h 2005-04-16 17:06:43 UTC (rev 6357)
+++ branches/SAMBA_3_0/source/include/smb_macros.h 2005-04-16 20:48:04 UTC (rev 6358)
@@ -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 */
More information about the samba-cvs
mailing list