summaryrefslogtreecommitdiff
path: root/usr.bin/systat/netcmds.c
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2001-12-07 07:57:37 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2001-12-07 07:57:37 +0000
commit682a9f58ff9b22f31d9c8a39ef0588efb6dc8b6f (patch)
treeca2436d1c78bd021525b94ef7c25f67f04f31773 /usr.bin/systat/netcmds.c
parent1759f3f7346ef1dda87d5f3dd4ac6e91032d3488 (diff)
back out latest changes which cause problems on alpha/sparc64 until
they are fixed
Diffstat (limited to 'usr.bin/systat/netcmds.c')
-rw-r--r--usr.bin/systat/netcmds.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c
index c299e0b4311..58aa82f8156 100644
--- a/usr.bin/systat/netcmds.c
+++ b/usr.bin/systat/netcmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcmds.c,v 1.7 2001/11/23 22:20:06 deraadt Exp $ */
+/* $OpenBSD: netcmds.c,v 1.8 2001/12/07 07:57:35 pvalchev Exp $ */
/* $NetBSD: netcmds.c,v 1.4 1995/05/21 17:14:38 mycroft Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)netcmds.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: netcmds.c,v 1.7 2001/11/23 22:20:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: netcmds.c,v 1.8 2001/12/07 07:57:35 pvalchev Exp $";
#endif /* not lint */
/*
@@ -327,8 +327,8 @@ checkhost(inp)
if (hosts)
for (p = hosts; p < hosts+nhosts; p++) {
- if (((struct sockaddr *)&p->addr)->sa_family == AF_INET &&
- !(inp->inp_flags & INP_IPV6)) {
+ if (((struct sockaddr *)&p->addr)->sa_family == AF_INET
+ && !(inp->inp_flags & INP_IPV6)) {
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)&p->addr;
if (sin->sin_addr.s_addr == inp->inp_laddr.s_addr ||
@@ -336,8 +336,8 @@ checkhost(inp)
return (p->onoff);
}
#ifdef INET6
- if (((struct sockaddr *)&p->addr)->sa_family == AF_INET6 &&
- (inp->inp_flags & INP_IPV6)) {
+ if (((struct sockaddr *)&p->addr)->sa_family == AF_INET6
+ && (inp->inp_flags & INP_IPV6)) {
struct sockaddr_in6 *sin6;
sin6 = (struct sockaddr_in6 *)&p->addr;
if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &inp->inp_laddr6) ||
@@ -366,7 +366,7 @@ showhosts()
sa = (struct sockaddr *)&p->addr;
if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0,
flags) != 0)
- strlcpy(hbuf, "(invalid)", sizeof hbuf);
+ strcpy(hbuf, "(invalid)");
if (!p->onoff)
addch('!');
printw("%s ", hbuf);