diff options
Diffstat (limited to 'usr.sbin/traceroute6/traceroute6.c')
-rw-r--r-- | usr.sbin/traceroute6/traceroute6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index 1c74d9d9f8f..6c7caa02fb3 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute6.c,v 1.22 2002/06/02 06:42:29 deraadt Exp $ */ +/* $OpenBSD: traceroute6.c,v 1.23 2002/06/09 02:15:54 deraadt Exp $ */ /* $KAME: traceroute6.c,v 1.50 2002/05/26 13:12:07 itojun Exp $ */ /* @@ -1291,7 +1291,7 @@ inetname(sa) if (first && !nflag) { first = 0; if (gethostname(domain, sizeof(domain)) == 0 && - (cp = index(domain, '.'))) + (cp = strchr(domain, '.'))) (void) strlcpy(domain, cp + 1, sizeof(domain)); else domain[0] = 0; @@ -1300,7 +1300,7 @@ inetname(sa) if (!nflag) { if (getnameinfo(sa, sa->sa_len, line, sizeof(line), NULL, 0, NI_NAMEREQD) == 0) { - if ((cp = index(line, '.')) && + if ((cp = strchr(line, '.')) && !strcmp(cp + 1, domain)) *cp = 0; cp = line; |