diff options
Diffstat (limited to 'usr.bin/netstat/sctp.c')
-rw-r--r-- | usr.bin/netstat/sctp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c index d5ad70e..fb94d44 100644 --- a/usr.bin/netstat/sctp.c +++ b/usr.bin/netstat/sctp.c @@ -162,7 +162,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; @@ -171,7 +171,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; @@ -209,7 +209,7 @@ sctp_print_address(union sctp_sockstore *address, int port, int num_port) sprintf(line, "%.*s.", Wflag ? 39 : 16, ""); break; } - cp = index(line, '\0'); + cp = strchr(line, '\0'); if (!num_port && port) sp = getservbyport((int)port, "sctp"); if (sp || port == 0) |