revision 1.117
date: 2004/07/15 00:13:01; author: guy; state: Exp; lines: +3 -3
"sizeof()" could be "unsigned long" or "unsigned int"; cast it to
"unsigned long" and print it with "%lu", so it works in either case,
regardless of whether "long" is the same size as "int" or not.
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.107.2.4 2004-07-08 10:29:40 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.107.2.5 2004-07-28 20:11:31 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
}
if (hlen < sizeof(*tp)) {
- (void)printf(" tcp %d [bad hdr length %u - too short, < %u]",
- length - hlen, hlen, sizeof(*tp));
+ (void)printf(" tcp %d [bad hdr length %u - too short, < %lu]",
+ length - hlen, hlen, (unsigned long)sizeof(*tp));
return;
}