1
0
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:
david
2012-12-22 06:02:25 +00:00
parent a90bafc9f4
commit d98bbcc8ab

View File

@@ -126,6 +126,13 @@ void logdebug(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2))); __attribute__ ((format (printf, 1, 2)));
/* handle errors */ /* handle errors */
#define ncat_assert(expr) \
do { \
if (!(expr)) \
bye("assertion failed: %s", #expr); \
} while (0)
void die(char *); void die(char *);
void bye(const char *, ...) void bye(const char *, ...)