From 22e725eda5ca4436c36a53fbca3ea39031870e6a Mon Sep 17 00:00:00 2001 From: Christian Weisgerber Date: Sat, 17 Sep 2011 15:59:45 +0000 Subject: access a 32-bit field as u_int32_t, not as u_long; ok bluhm@ --- usr.sbin/tcpdump/print-icmp6.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/tcpdump/print-icmp6.c b/usr.sbin/tcpdump/print-icmp6.c index dffec6c35cf..b8609b041e1 100644 --- a/usr.sbin/tcpdump/print-icmp6.c +++ b/usr.sbin/tcpdump/print-icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-icmp6.c,v 1.8 2010/04/06 16:01:57 jsg Exp $ */ +/* $OpenBSD: print-icmp6.c,v 1.9 2011/09/17 15:59:44 naddy Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994 @@ -422,14 +422,14 @@ icmp6_print(const u_char *bp, u_int length, const u_char *bp2) if (vflag) { printf(",%s", mode == FQDN ? "FQDN" : "WRU"); if (mode == FQDN) { - long ttl; - ttl = (long)ntohl(*(u_long *)&buf[8]); + int ttl; + ttl = (int)ntohl(*(u_int32_t *)&buf[8]); if (dp->icmp6_code == 1) printf(",TTL=unknown"); else if (ttl < 0) - printf(",TTL=%ld:invalid", ttl); + printf(",TTL=%d:invalid", ttl); else - printf(",TTL=%ld", ttl); + printf(",TTL=%d", ttl); if (buf[12] != ep - buf - 13) { (void)printf(",invalid namelen:%d/%u", buf[12], -- cgit v1.2.3