diff options
author | Gerald Carter <jerry@samba.org> | 2005-04-16 20:48:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:38 -0500 |
commit | b49c586de46396018bf26828d78e591e67de3c0f (patch) | |
tree | 6b37099f290f22b8101dfdfe4c9a24815522646d | |
parent | 6cc85bbe728421df9c3f21e1676789eca6814420 (diff) | |
download | samba-b49c586de46396018bf26828d78e591e67de3c0f.tar.gz samba-b49c586de46396018bf26828d78e591e67de3c0f.tar.bz2 samba-b49c586de46396018bf26828d78e591e67de3c0f.zip |
r6358: merging SMB_ASSERT() changes from the release branch
(This used to be commit 70178d5d27900d56ad1da3c99f3a63d863fb324c)
-rw-r--r-- | source3/include/smb_macros.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 04616eb8ab..6d1e382bb8 100644 --- a/source3/include/smb_macros.h +++ b/source3/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 */ |