summaryrefslogtreecommitdiff
path: root/usr.sbin/traceroute6/traceroute6.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-09 02:15:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-09 02:15:55 +0000
commitfe7cb77bf344dfe9ac77276dd5d730280cb6453f (patch)
tree4cba6c90ce481bef5c7501f8bbe3894e56437890 /usr.sbin/traceroute6/traceroute6.c
parent79d7fc187005f7fc0edf2ff225adae5df1caf3c8 (diff)
strchr() instead of index()
Diffstat (limited to 'usr.sbin/traceroute6/traceroute6.c')
-rw-r--r--usr.sbin/traceroute6/traceroute6.c6
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;