mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Add an ncat_assert macro.
This is an assert that will remain even if NDEBUG is defined.
This commit is contained in:
parent
a90bafc9f4
commit
d98bbcc8ab
1 changed files with 7 additions and 0 deletions
|
|
@ -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 *, ...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue