]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Just use u_int, even for values that fit in 16 bits; that squelches a
authorGuy Harris <[email protected]>
Thu, 21 May 2009 17:48:19 +0000 (10:48 -0700)
committerGuy Harris <[email protected]>
Thu, 21 May 2009 17:48:19 +0000 (10:48 -0700)
(irrelevant, but true for the way C works) signed vs. unsigned
comparison warning.  It also probably produces better machine code.

print-olsr.c

index 07a04b537738431bfbeefd4a5ccd2b8da6b9f6cf..895c9f3714dcf62f6aad2415e3a33e8ff2c1856f 100644 (file)
@@ -520,10 +520,10 @@ olsr_print (const u_char *pptr, u_int length, int is_ipv6)
 
         case OLSR_NAMESERVICE_MSG:
         {
-            u_int16_t name_entries = EXTRACT_16BITS(msg_data+2);
-            u_int16_t addr_size = 4;
+            u_int name_entries = EXTRACT_16BITS(msg_data+2);
+            u_int addr_size = 4;
             int name_entries_valid = 0;
-            u_int16_t i;
+            u_int i;
 
             if (is_ipv6)
                 addr_size = 16;