diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-06-24 03:53:02 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-06-24 03:53:02 +0000 |
commit | 07f4b79c6a9105e20d7692005d377a5024abc585 (patch) | |
tree | 12d08a7e8225daadd8be54e301b8140deca67ff8 /usr.bin | |
parent | 2c595ddcac63062c46e367dc576614a1dce32706 (diff) |
64bit fixes similar to some in sbin/route/route.c
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/route.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index d74803ae556..1dbbc09a1e7 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.10 1997/06/18 01:58:32 deraadt Exp $ */ +/* $OpenBSD: route.c,v 1.11 1997/06/24 03:53:01 millert Exp $ */ /* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else -static char *rcsid = "$OpenBSD: route.c,v 1.10 1997/06/18 01:58:32 deraadt Exp $"; +static char *rcsid = "$OpenBSD: route.c,v 1.11 1997/06/24 03:53:01 millert Exp $"; #endif #endif /* not lint */ @@ -382,7 +382,7 @@ np_rtentry(rtm) else { p_sockaddr(sa, rtm->rtm_flags, 16); if (sa->sa_len == 0) - sa->sa_len = sizeof(long); + sa->sa_len = sizeof(u_int32_t); sa = (struct sockaddr *)(sa->sa_len + (char *)sa); p_sockaddr(sa, 0, 18); } @@ -576,8 +576,7 @@ netname(in, mask) char *cp = 0; static char line[MAXHOSTNAMELEN + 1]; struct netent *np = 0; - u_int32_t net; - int subnetshift; + u_int32_t net, subnetshift; in = ntohl(in); mask = ntohl(mask); @@ -602,7 +601,7 @@ netname(in, mask) * width subnet fields. */ while (in &~ mask) - mask = (long)mask >> subnetshift; + mask = (int)mask >> subnetshift; } net = in & mask; while ((mask & 1) == 0) |