diff options
Diffstat (limited to 'usr.bin/systat/netcmds.c')
-rw-r--r-- | usr.bin/systat/netcmds.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c index 58aa82f8156..978063cccf1 100644 --- a/usr.bin/systat/netcmds.c +++ b/usr.bin/systat/netcmds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcmds.c,v 1.8 2001/12/07 07:57:35 pvalchev Exp $ */ +/* $OpenBSD: netcmds.c,v 1.9 2001/12/07 09:18:08 deraadt 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.8 2001/12/07 07:57:35 pvalchev Exp $"; +static char rcsid[] = "$OpenBSD: netcmds.c,v 1.9 2001/12/07 09:18:08 deraadt 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) - strcpy(hbuf, "(invalid)"); + strlcpy(hbuf, "(invalid)", sizeof hbuf); if (!p->onoff) addch('!'); printw("%s ", hbuf); |