Skip to content

Commit 83c227e

Browse files
committed
If you're going to pass a u_char as an int, cast it first.
1 parent be3b267 commit 83c227e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

usr.sbin/tcpdump/print-sl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: print-sl.c,v 1.8 1997/10/03 19:55:41 christos Exp $ */
1+
/* $NetBSD: print-sl.c,v 1.9 1997/10/13 20:44:09 cjs Exp $ */
22

33
/*
44
* Copyright (c) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
2727
static const char rcsid[] =
2828
"@(#) Header: print-sl.c,v 1.42 97/06/12 14:21:35 leres Exp (LBL)";
2929
#else
30-
__RCSID("$NetBSD: print-sl.c,v 1.8 1997/10/03 19:55:41 christos Exp $");
30+
__RCSID("$NetBSD: print-sl.c,v 1.9 1997/10/13 20:44:09 cjs Exp $");
3131
#endif
3232
#endif
3333

@@ -288,7 +288,7 @@ compressed_sl_print(const u_char *chdr, const struct ip *ip,
288288
hlen = ip->ip_hl;
289289
hlen += ((struct tcphdr *)&((int32_t *)ip)[hlen])->th_off;
290290
lastlen[dir][lastconn] = length - (hlen << 2);
291-
printf(" %d (%d)", lastlen[dir][lastconn], cp - chdr);
291+
printf(" %d (%d)", lastlen[dir][lastconn], (int)(cp - chdr));
292292
}
293293
#else
294294
#include <sys/types.h>

0 commit comments

Comments
 (0)