From: Guy Harris Date: Thu, 21 May 2009 17:48:19 +0000 (-0700) Subject: Just use u_int, even for values that fit in 16 bits; that squelches a X-Git-Tag: tcpdump-4.1.0~116 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/57bc7f6ef54126ecc092e46bc5a1c5a6fffcae26 Just use u_int, even for values that fit in 16 bits; that squelches a (irrelevant, but true for the way C works) signed vs. unsigned comparison warning. It also probably produces better machine code. --- diff --git a/print-olsr.c b/print-olsr.c index 07a04b53..895c9f37 100644 --- a/print-olsr.c +++ b/print-olsr.c @@ -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;