]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Squelch a signed vs. unsigned comparison warning.
authorGuy Harris <[email protected]>
Tue, 2 Aug 2016 20:03:34 +0000 (13:03 -0700)
committerGuy Harris <[email protected]>
Tue, 2 Aug 2016 20:03:34 +0000 (13:03 -0700)
Multiplying a uint8_t by an int results in an int, not an unsigned int;
make NSH_HDR_WORD_SIZE an unsigned constant so the multiplication is
uint8_t times unsigned int.

print-nsh.c

index 1a27b713d89d7523079a873777e093f46505ec6a..0130e6dd1c96f9a1c88ea4b4ad5c4e4767f8ea59 100644 (file)
@@ -39,7 +39,7 @@ static const struct tok nsh_flags [] = {
 
 #define NSH_BASE_HDR_LEN 4
 #define NSH_SERVICE_PATH_HDR_LEN 4
-#define NSH_HDR_WORD_SIZE 4
+#define NSH_HDR_WORD_SIZE 4U
 
 /*
  * NSH, draft-ietf-sfc-nsh-01 Network Service Header