X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b37cd5e2a6db1ce2ae26803e23afb12453c79a30..c519841be2fe87b3cdd9dc45fa7eb8b4266d40a5:/print-msdp.c diff --git a/print-msdp.c b/print-msdp.c index 62cb1bf2..50d445e5 100644 --- a/print-msdp.c +++ b/print-msdp.c @@ -16,15 +16,18 @@ * FOR A PARTICULAR PURPOSE. */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.1 2001-09-17 20:06:18 fenner 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 "interface.h" #include "addrtoname.h" @@ -49,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; @@ -62,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(" ");