summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/inet6.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/netstat/inet6.c')
-rw-r--r--usr.bin/netstat/inet6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index 03fef6e..1a19fa5 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1100,7 +1100,7 @@ inet6print(struct in6_addr *in6, int port, const char *proto, int numeric)
sprintf(line, "%.*s.", Wflag ? 39 :
(Aflag && !numeric) ? 12 : 16, inet6name(in6));
- cp = index(line, '\0');
+ cp = strchr(line, '\0');
if (!numeric && port)
GETSERVBYPORT6(port, proto, sp);
if (sp || port == 0)
@@ -1129,7 +1129,7 @@ inet6name(struct in6_addr *in6p)
if (first && !numeric_addr) {
first = 0;
if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
- (cp = index(domain, '.')))
+ (cp = strchr(domain, '.')))
(void) strcpy(domain, cp + 1);
else
domain[0] = 0;
@@ -1138,7 +1138,7 @@ inet6name(struct in6_addr *in6p)
if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) {
hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6);
if (hp) {
- if ((cp = index(hp->h_name, '.')) &&
+ if ((cp = strchr(hp->h_name, '.')) &&
!strcmp(cp + 1, domain))
*cp = 0;
cp = hp->h_name;
OpenPOWER on IntegriCloud