diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-17 07:14:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-17 07:14:33 +0000 |
commit | 3e150a880447536a0af58c395e5a857635e985d3 (patch) | |
tree | 867c3504f60ee9bfd2fa5db3dd66d5b3a1649ecd /usr.sbin/traceroute | |
parent | 8e78a24e2e89c03ac53bd758a1781c925fe7ab71 (diff) |
r?index -> strr?chr
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r-- | usr.sbin/traceroute/traceroute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index b52183a7cc7..91752c46c2e 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -817,7 +817,7 @@ inetname(in) if (first && !nflag) { first = 0; if (gethostname(domain, MAXHOSTNAMELEN) == 0 && - (cp = index(domain, '.'))) + (cp = strchr(domain, '.'))) (void) strcpy(domain, cp + 1); else domain[0] = 0; @@ -826,7 +826,7 @@ inetname(in) if (!nflag && in.s_addr != INADDR_ANY) { hp = gethostbyaddr((char *)&in, sizeof (in), AF_INET); if (hp) { - if ((cp = index(hp->h_name, '.')) && + if ((cp = strchr(hp->h_name, '.')) && !strcmp(cp + 1, domain)) *cp = 0; cp = hp->h_name; |