mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r6358: merging SMB_ASSERT() changes from the release branch
(This used to be commit 70178d5d27900d56ad1da3c99f3a63d863fb324c)
This commit is contained in:
parent
6cc85bbe72
commit
b49c586de4
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user