]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Zephyr: Fix the ZEPHYR_PRINT() macro
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 9 Feb 2022 18:12:26 +0000 (19:12 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 9 Feb 2022 18:18:10 +0000 (19:18 +0100)
A block is needed.

print-zephyr.c

index b3d897e0db8a32815655b7158dbb543cf10e6c87..11e1e59316a419956f0ac8b4eff7954aac1226fd 100644 (file)
@@ -140,8 +140,7 @@ str_to_lower(const char *string)
 }
 
 #define ZEPHYR_PRINT(str1,str2) \
-ND_PRINT("%s", str1); \
-fn_print_str(ndo, (const u_char *)str2);
+{ ND_PRINT("%s", (str1)); fn_print_str(ndo, (const u_char *)(str2)); }
 
 void
 zephyr_print(netdissect_options *ndo, const u_char *cp, u_int length)