diff --git a/main.c b/main.c index e542f4f..f95732c 100644 --- a/main.c +++ b/main.c @@ -27,8 +27,9 @@ #define VERSION "15" -ASSERT_SIZE(struct in_addr, 4) -ASSERT_SIZE(struct in6_addr, 16) +ASSERT(sizeof(struct in_addr) == 4) +ASSERT(sizeof(struct in6_addr) == 16) + char ip_option[1] = "\0"; diff --git a/params.h b/params.h index 5d3d7dd..706be71 100644 --- a/params.h +++ b/params.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "mpool.h" @@ -131,7 +132,6 @@ extern struct packet fake_udp; extern char ip_option[1]; -#define ASSERT_SIZE(stc, len) \ - static char t[-(int)sizeof(stc) + len]; \ - static char tt[(int)sizeof(t) * -1]; +#define ASSERT(exp) \ + char t[(exp) ? 1 : -1]; #endif