summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/netstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/systat/netstat.c')
-rw-r--r--usr.bin/systat/netstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c
index d96fb16..a5e0608 100644
--- a/usr.bin/systat/netstat.c
+++ b/usr.bin/systat/netstat.c
@@ -554,7 +554,7 @@ inetprint(struct sockaddr *sa, const char *proto)
break;
}
snprintf(line, sizeof(line), "%.*s.", 16, inetname(sa));
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
if (!nflag && port)
sp = getservbyport(port, proto);
if (sp || port == 0)
@@ -564,7 +564,7 @@ inetprint(struct sockaddr *sa, const char *proto)
snprintf(cp, sizeof(line) - (cp - line), "%d",
ntohs((u_short)port));
/* pad to full column to clear any garbage */
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
while (cp - line < 22)
*cp++ = ' ';
line[22] = '\0';
OpenPOWER on IntegriCloud