Change printf format to print unsigned values. Minor spacing change of
casts to match file/style(9).
Attempted to match printf formating of unsigned 32bits to rest of
file.
Index: print-tcp.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/print-tcp.c,v
retrieving revision 1.33
diff -u -p -r1.33 print-tcp.c
--- print-tcp.c 20 Aug 2015 22:39:29 -0000 1.33
+++ print-tcp.c 3 Nov 2015 07:17:39 -0000
@@ -221,7 +221,7 @@ tcp_print(register const u_char *bp, reg
ch = '\0';
if (length < sizeof(*tp)) {
- (void)printf("truncated-tcp %d", length);
+ (void)printf("truncated-tcp %lu", (long)length);
return;
}
@@ -476,15 +476,15 @@ tcp_print(register const u_char *bp, reg
length -= hlen;
if (vflag > 1 || length > 0 || flags & (TH_SYN | TH_FIN | TH_RST))
- (void)printf(" %lu:%lu(%d)", (long) seq, (long) (seq + length),
- length);
+ (void)printf(" %lu:%lu(%lu)", (long)seq, (long)(seq + length),
+ (long)length);
if (flags & TH_ACK)
- (void)printf(" ack %u", ack);
+ (void)printf(" ack %lu", (long)ack);
- (void)printf(" win %d", win);
+ (void)printf(" win %u", win);
if (flags & TH_URG)
- (void)printf(" urg %d", urp);
+ (void)printf(" urg %u", urp);
/*
* Handle any options.
*/