mirror of
https://github.com/nmap/nmap.git
synced 2025-12-23 07:59:03 +00:00
Add an ncat_assert macro.
This is an assert that will remain even if NDEBUG is defined.
This commit is contained in:
@@ -126,6 +126,13 @@ void logdebug(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
/* handle errors */
|
||||
|
||||
#define ncat_assert(expr) \
|
||||
do { \
|
||||
if (!(expr)) \
|
||||
bye("assertion failed: %s", #expr); \
|
||||
} while (0)
|
||||
|
||||
void die(char *);
|
||||
|
||||
void bye(const char *, ...)
|
||||
|
||||
Reference in New Issue
Block a user