improved parameters
This commit is contained in:
@@ -6,18 +6,12 @@
|
||||
*/
|
||||
/* $Header$ */
|
||||
|
||||
void _bad_assertion(const char *expr, const char *file, int line);
|
||||
void __bad_assertion(const char *__expr, const char *__file, int __line);
|
||||
|
||||
#undef assert
|
||||
|
||||
#ifdef NDEBUG
|
||||
#if defined(NDEBUG)
|
||||
#define assert(ignore) ((void)0)
|
||||
#else
|
||||
#define assert(expr) \
|
||||
{ \
|
||||
if (!(expr)) { \
|
||||
_bad_assertion( #expr, __FILE__, __LINE); \
|
||||
abort(); \
|
||||
} \
|
||||
}
|
||||
#define assert(expr) ((expr)? (void)0 : __bad_assertion( #expr, __FILE__, __LINE__))
|
||||
#endif /* NDEBUG */
|
||||
|
||||
Reference in New Issue
Block a user