X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3d932490b826facb568937a1290910a1265267f5..4fe64c9d253007f06b52c6d8be2c99bfc28f989b:/print-msdp.c diff --git a/print-msdp.c b/print-msdp.c index 0d97f890..a228ab7c 100644 --- a/print-msdp.c +++ b/print-msdp.c @@ -16,8 +16,8 @@ * FOR A PARTICULAR PURPOSE. */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.3 2002-08-01 08:53:20 risso Exp $"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.7 2005-04-06 21:32:41 mcr Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -52,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; @@ -65,12 +65,12 @@ 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(" "); - ip_print(sp + *sp * 12 + 8 - 3, + ip_print(gndo, sp + *sp * 12 + 8 - 3, len - (*sp * 12 + 8)); } } @@ -99,3 +99,10 @@ msdp_print(const unsigned char *sp, u_int length) trunc: (void)printf(" [|msdp]"); } + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 8 + * End: + */