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.bin/netstat | |
parent | 8e78a24e2e89c03ac53bd758a1781c925fe7ab71 (diff) |
r?index -> strr?chr
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/if.c | 6 | ||||
-rw-r--r-- | usr.bin/netstat/inet.c | 10 | ||||
-rw-r--r-- | usr.bin/netstat/iso.c | 6 | ||||
-rw-r--r-- | usr.bin/netstat/route.c | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index d827d215c27..12d1be9dee4 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.9 1996/08/16 09:38:56 mickey Exp $ */ +/* $OpenBSD: if.c,v 1.10 1997/01/17 07:12:55 millert Exp $ */ /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -static char *rcsid = "$OpenBSD: if.c,v 1.9 1996/08/16 09:38:56 mickey Exp $"; +static char *rcsid = "$OpenBSD: if.c,v 1.10 1997/01/17 07:12:55 millert Exp $"; #endif #endif /* not lint */ @@ -136,7 +136,7 @@ intpr(interval, ifnetaddr) ifnetaddr = (u_long)ifnet.if_list.tqe_next; if (interface != 0 && strcmp(name, interface) != 0) continue; - cp = index(name, '\0'); + cp = strchr(name, '\0'); if ((ifnet.if_flags & IFF_UP) == 0) *cp++ = '*'; *cp = '\0'; diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index bc33664379a..7b5873666ec 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.3 1996/06/26 05:37:21 deraadt Exp $ */ +/* $OpenBSD: inet.c,v 1.4 1997/01/17 07:12:57 millert Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -static char *rcsid = "$OpenBSD: inet.c,v 1.3 1996/06/26 05:37:21 deraadt Exp $"; +static char *rcsid = "$OpenBSD: inet.c,v 1.4 1997/01/17 07:12:57 millert Exp $"; #endif #endif /* not lint */ @@ -434,7 +434,7 @@ inetprint(in, port, proto) int width; sprintf(line, "%.*s.", (Aflag && !nflag) ? 12 : 16, inetname(in)); - cp = index(line, '\0'); + cp = strchr(line, '\0'); if (!nflag && port) sp = getservbyport((int)port, proto); if (sp || port == 0) @@ -464,7 +464,7 @@ inetname(inp) 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; @@ -482,7 +482,7 @@ inetname(inp) if (cp == 0) { hp = gethostbyaddr((char *)inp, sizeof (*inp), 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; diff --git a/usr.bin/netstat/iso.c b/usr.bin/netstat/iso.c index 7e0a76bd907..6f5d6af88ef 100644 --- a/usr.bin/netstat/iso.c +++ b/usr.bin/netstat/iso.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iso.c,v 1.2 1996/06/26 05:37:21 deraadt Exp $ */ +/* $OpenBSD: iso.c,v 1.3 1997/01/17 07:12:58 millert Exp $ */ /* $NetBSD: iso.c,v 1.12 1995/10/03 21:42:38 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)iso.c 8.1 (Berkeley) 6/6/93"; #else -static char *rcsid = "$OpenBSD: iso.c,v 1.2 1996/06/26 05:37:21 deraadt Exp $"; +static char *rcsid = "$OpenBSD: iso.c,v 1.3 1997/01/17 07:12:58 millert Exp $"; #endif #endif /* not lint */ @@ -419,7 +419,7 @@ isonetprint(iso, sufx, sufxlen, islocal) int Alen = Aflag?18:22; line = isonetname(iso); - cp = index(line, '\0'); + cp = strchr(line, '\0'); ihe = (struct iso_hostent *)0; if( islocal ) diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 387b4e9ffce..e0645de89fc 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.6 1996/10/25 10:50:52 deraadt Exp $ */ +/* $OpenBSD: route.c,v 1.7 1997/01/17 07:13:00 millert Exp $ */ /* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else -static char *rcsid = "$OpenBSD: route.c,v 1.6 1996/10/25 10:50:52 deraadt Exp $"; +static char *rcsid = "$OpenBSD: route.c,v 1.7 1997/01/17 07:13:00 millert Exp $"; #endif #endif /* not lint */ @@ -497,7 +497,7 @@ routename(in) if (first) { first = 0; if (gethostname(domain, MAXHOSTNAMELEN) == 0 && - (cp = index(domain, '.'))) + (cp = strchr(domain, '.'))) (void) strcpy(domain, cp + 1); else domain[0] = 0; @@ -507,7 +507,7 @@ routename(in) hp = gethostbyaddr((char *)&in, sizeof (struct in_addr), 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; |