X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/d250e479dfc1df079f692c62270685c8d40b236f..ae05d24b8704024d2331d03475a9e6a213b19c69:/print-msdp.c diff --git a/print-msdp.c b/print-msdp.c index 4fe9eb87..50d445e5 100644 --- a/print-msdp.c +++ b/print-msdp.c @@ -16,19 +16,18 @@ * FOR A PARTICULAR PURPOSE. */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.2 2001-12-10 08:06:40 guy Exp $"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.6 2003-11-16 09:36:29 guy Exp $"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include + #include #include -#include - -#include #include "interface.h" #include "addrtoname.h" @@ -53,7 +52,7 @@ msdp_print(const unsigned char *sp, u_int length) type = *sp; len = EXTRACT_16BITS(sp + 1); if (len > 1400 || vflag) - printf(" [len %d]", len); + printf(" [len %u]", len); if (len < 3) goto trunc; sp += 3; @@ -66,8 +65,8 @@ msdp_print(const unsigned char *sp, u_int length) else (void)printf(" SA-Response"); TCHECK(*sp); - (void)printf(" %d entries", *sp); - if (*sp * 12 + 8 < len) { + (void)printf(" %u entries", *sp); + if ((u_int)((*sp * 12) + 8) < len) { (void)printf(" [w/data]"); if (vflag > 1) { (void)printf(" ");