summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-01-17 07:14:33 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-01-17 07:14:33 +0000
commit3e150a880447536a0af58c395e5a857635e985d3 (patch)
tree867c3504f60ee9bfd2fa5db3dd66d5b3a1649ecd /usr.sbin
parent8e78a24e2e89c03ac53bd758a1781c925fe7ab71 (diff)
r?index -> strr?chr
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/chown/chown.c4
-rw-r--r--usr.sbin/config.old/mkmakefile.c4
-rw-r--r--usr.sbin/config.old/specfile.c4
-rw-r--r--usr.sbin/config/files.c6
-rw-r--r--usr.sbin/edquota/edquota.c6
-rw-r--r--usr.sbin/ipftest/ipft_hx.c8
-rw-r--r--usr.sbin/ipftest/ipft_tx.c16
-rw-r--r--usr.sbin/ipftest/ipt.c8
-rw-r--r--usr.sbin/mtree/spec.c8
-rw-r--r--usr.sbin/pkg_install/add/futil.c6
-rw-r--r--usr.sbin/pkg_install/create/perform.c10
-rw-r--r--usr.sbin/pkg_install/lib/file.c8
-rw-r--r--usr.sbin/pkg_install/lib/plist.c6
-rw-r--r--usr.sbin/pkg_install/lib/str.c8
-rw-r--r--usr.sbin/quotaon/quotaon.c10
-rw-r--r--usr.sbin/rbootd/parseconf.c2
-rw-r--r--usr.sbin/rbootd/rmpproto.c2
-rw-r--r--usr.sbin/repquota/repquota.c6
-rw-r--r--usr.sbin/rpc.bootparamd/bootparamd.c5
-rw-r--r--usr.sbin/rwhod/rwhod.c4
-rw-r--r--usr.sbin/traceroute/traceroute.c4
-rw-r--r--usr.sbin/ypserv/makedbm/makedbm.c6
22 files changed, 70 insertions, 71 deletions
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c
index 3c437c24f37..f227b174959 100644
--- a/usr.sbin/chown/chown.c
+++ b/usr.sbin/chown/chown.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94"; */
-static char *rcsid = "$Id: chown.c,v 1.2 1997/01/15 23:43:52 millert Exp $";
+static char *rcsid = "$Id: chown.c,v 1.3 1997/01/17 07:13:57 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -78,7 +78,7 @@ main(argc, argv)
int Hflag, Lflag, Pflag, ch, fts_options, hflag, rval;
char *cp;
- myname = (cp = rindex(*argv, '/')) ? cp + 1 : *argv;
+ myname = (cp = strrchr(*argv, '/')) ? cp + 1 : *argv;
ischown = myname[2] == 'o';
Hflag = Lflag = Pflag = hflag = 0;
diff --git a/usr.sbin/config.old/mkmakefile.c b/usr.sbin/config.old/mkmakefile.c
index c99a1be47ed..18924797021 100644
--- a/usr.sbin/config.old/mkmakefile.c
+++ b/usr.sbin/config.old/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.2 1997/01/12 07:43:35 downsj Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.3 1997/01/17 07:13:59 millert Exp $ */
/* $NetBSD: mkmakefile.c,v 1.29 1996/06/10 02:32:26 thorpej Exp $ */
/*
@@ -358,7 +358,7 @@ tail(fn)
{
register char *cp;
- cp = rindex(fn, '/');
+ cp = strrchr(fn, '/');
if (cp == 0)
return (fn);
return (cp+1);
diff --git a/usr.sbin/config.old/specfile.c b/usr.sbin/config.old/specfile.c
index 01a150c2eaf..b7224b7224c 100644
--- a/usr.sbin/config.old/specfile.c
+++ b/usr.sbin/config.old/specfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: specfile.c,v 1.2 1997/01/12 07:43:37 downsj Exp $ */
+/* $OpenBSD: specfile.c,v 1.3 1997/01/17 07:14:00 millert Exp $ */
/* $NetBSD: specfile.c,v 1.10 1995/08/17 17:22:22 thorpej Exp $ */
#ifndef lint
@@ -433,7 +433,7 @@ read_file(filename, fatal_on_open, override)
case BEFORE_FILENAME: {
kf_name = ns(str);
if (strncmp(kf_name, "OPTIONS/", 8) == 0) {
- kf_name = ns(index(kf_name, '/') + 1);
+ kf_name = ns(strchr(kf_name, '/') + 1);
is_option++;
}
parse_state = BEFORE_SPEC;
diff --git a/usr.sbin/config/files.c b/usr.sbin/config/files.c
index 0dc14a154a4..8d7eda6a391 100644
--- a/usr.sbin/config/files.c
+++ b/usr.sbin/config/files.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: files.c,v 1.5 1996/08/29 03:33:05 deraadt Exp $ */
+/* $OpenBSD: files.c,v 1.6 1997/01/17 07:14:02 millert Exp $ */
/* $NetBSD: files.c,v 1.6 1996/03/17 13:18:17 cgd Exp $ */
/*
@@ -123,12 +123,12 @@ addfile(path, optx, flags, rule)
}
/* find last part of pathname, and same without trailing suffix */
- tail = rindex(path, '/');
+ tail = strrchr(path, '/');
if (tail == NULL)
tail = path;
else
tail++;
- dotp = rindex(tail, '.');
+ dotp = strrchr(tail, '.');
if (dotp == NULL || dotp[1] == 0 ||
(baselen = dotp - tail) >= sizeof(base)) {
error("invalid pathname `%s'", path);
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index b1e2af1c6c3..1373a6bcd9a 100644
--- a/usr.sbin/edquota/edquota.c
+++ b/usr.sbin/edquota/edquota.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)edquota.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: edquota.c,v 1.13 1996/09/16 02:19:37 millert Exp $";
+static char *rcsid = "$Id: edquota.c,v 1.14 1997/01/17 07:14:04 millert Exp $";
#endif /* not lint */
/*
@@ -730,7 +730,7 @@ hasquota(fs, type, qfnamep)
char **qfnamep;
{
register char *opt;
- char *cp, *index(), *strtok();
+ char *cp;
static char initname, usrname[100], grpname[100];
static char buf[BUFSIZ];
@@ -741,7 +741,7 @@ hasquota(fs, type, qfnamep)
}
strcpy(buf, fs->fs_mntops);
for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) {
- if ((cp = index(opt, '=')))
+ if ((cp = strchr(opt, '=')))
*cp++ = '\0';
if (type == USRQUOTA && strcmp(opt, usrname) == 0)
break;
diff --git a/usr.sbin/ipftest/ipft_hx.c b/usr.sbin/ipftest/ipft_hx.c
index 46c795778cf..454a8f93fbc 100644
--- a/usr.sbin/ipftest/ipft_hx.c
+++ b/usr.sbin/ipftest/ipft_hx.c
@@ -39,7 +39,7 @@
#ifndef lint
static char sccsid[] = "@(#)ipft_hx.c 1.1 3/9/96 (C) 1996 Darren Reed";
-static char rcsid[] = "$Id: ipft_hx.c,v 1.2 1996/07/18 04:59:23 dm Exp $";
+static char rcsid[] = "$Id: ipft_hx.c,v 1.3 1997/01/17 07:14:06 millert Exp $";
#endif
extern int opts;
@@ -93,14 +93,14 @@ int cnt, *dir;
ip = (struct ip *)buf;
*ifn = NULL;
while (fgets(line, sizeof(line)-1, tfp)) {
- if ((s = index(line, '\n'))) {
+ if ((s = strchr(line, '\n'))) {
if (s == line)
return (char *)ip - buf;
*s = '\0';
}
- if ((s = index(line, '\r')))
+ if ((s = strchr(line, '\r')))
*s = '\0';
- if ((s = index(line, '#')))
+ if ((s = strchr(line, '#')))
*s = '\0';
if (!*line)
continue;
diff --git a/usr.sbin/ipftest/ipft_tx.c b/usr.sbin/ipftest/ipft_tx.c
index af71291e8c8..39c53c43d75 100644
--- a/usr.sbin/ipftest/ipft_tx.c
+++ b/usr.sbin/ipftest/ipft_tx.c
@@ -39,7 +39,7 @@
#ifndef lint
static char sccsid[] = "@(#)ipft_tx.c 1.7 6/5/96 (C) 1993 Darren Reed";
-static char rcsid[] = "$Id: ipft_tx.c,v 1.4 1996/07/18 04:59:24 dm Exp $";
+static char rcsid[] = "$Id: ipft_tx.c,v 1.5 1997/01/17 07:14:07 millert Exp $";
#endif
extern int opts;
@@ -177,11 +177,11 @@ int cnt, *dir;
ip = (struct ip *)buf;
*ifn = NULL;
while (fgets(line, sizeof(line)-1, tfp)) {
- if ((s = index(line, '\n')))
+ if ((s = strchr(line, '\n')))
*s = '\0';
- if ((s = index(line, '\r')))
+ if ((s = strchr(line, '\r')))
*s = '\0';
- if ((s = index(line, '#')))
+ if ((s = strchr(line, '#')))
*s = '\0';
if (!*line)
continue;
@@ -264,7 +264,7 @@ int *out;
if (ip->ip_p == IPPROTO_TCP || ip->ip_p == IPPROTO_UDP) {
char *last;
- last = index(*cpp, ',');
+ last = strchr(*cpp, ',');
if (!last) {
fprintf(stderr, "tcp/udp with no source port\n");
return 1;
@@ -280,7 +280,7 @@ int *out;
if (ip->ip_p == IPPROTO_TCP || ip->ip_p == IPPROTO_UDP) {
char *last;
- last = index(*cpp, ',');
+ last = strchr(*cpp, ',');
if (!last) {
fprintf(stderr, "tcp/udp with no destination port\n");
return 1;
@@ -296,7 +296,7 @@ int *out;
char *s, *t;
for (s = *cpp; *s; s++)
- if ((t = index(tcp_flagset, *s)))
+ if ((t = strchr(tcp_flagset, *s)))
tcp->th_flags |= tcp_flags[t - tcp_flagset];
if (tcp->th_flags)
cpp++;
@@ -310,7 +310,7 @@ int *out;
s++, i++)
if (*s && !strncasecmp(*cpp, *s, strlen(*s))) {
ic->icmp_type = i;
- if ((t = index(*cpp, ',')))
+ if ((t = strchr(*cpp, ',')))
ic->icmp_code = atoi(t+1);
cpp++;
break;
diff --git a/usr.sbin/ipftest/ipt.c b/usr.sbin/ipftest/ipt.c
index 584ea41e8cf..4fc23c0f6eb 100644
--- a/usr.sbin/ipftest/ipt.c
+++ b/usr.sbin/ipftest/ipt.c
@@ -41,7 +41,7 @@
#ifndef lint
static char sccsid[] = "@(#)ipt.c 1.19 6/3/96 (C) 1993-1996 Darren Reed";
-static char rcsid[] = "$Id: ipt.c,v 1.6 1996/10/08 07:33:36 niklas Exp $";
+static char rcsid[] = "$Id: ipt.c,v 1.7 1997/01/17 07:14:08 millert Exp $";
#endif
extern int fr_check();
@@ -131,14 +131,14 @@ char *argv[];
/*
* treat both CR and LF as EOL
*/
- if ((s = index(line, '\n')))
+ if ((s = strchr(line, '\n')))
*s = '\0';
- if ((s = index(line, '\r')))
+ if ((s = strchr(line, '\r')))
*s = '\0';
/*
* # is comment marker, everything after is a ignored
*/
- if ((s = index(line, '#')))
+ if ((s = strchr(line, '#')))
*s = '\0';
if (!*line)
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c
index 70f1cb5246e..f2604766257 100644
--- a/usr.sbin/mtree/spec.c
+++ b/usr.sbin/mtree/spec.c
@@ -1,5 +1,5 @@
/* $NetBSD: spec.c,v 1.6 1995/03/07 21:12:12 cgd Exp $ */
-/* $OpenBSD: spec.c,v 1.5 1997/01/03 21:40:51 millert Exp $ */
+/* $OpenBSD: spec.c,v 1.6 1997/01/17 07:14:10 millert Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: spec.c,v 1.5 1997/01/03 21:40:51 millert Exp $";
+static char rcsid[] = "$OpenBSD: spec.c,v 1.6 1997/01/17 07:14:10 millert Exp $";
#endif
#endif /* not lint */
@@ -78,7 +78,7 @@ spec()
continue;
/* Find end of line. */
- if ((p = index(buf, '\n')) == NULL)
+ if ((p = strchr(buf, '\n')) == NULL)
err("line %d too long", lineno);
/* See if next line is continuation line. */
@@ -123,7 +123,7 @@ spec()
continue;
}
- if (index(p, '/'))
+ if (strchr(p, '/'))
err("slash character in file name");
if (!strcmp(p, "..")) {
diff --git a/usr.sbin/pkg_install/add/futil.c b/usr.sbin/pkg_install/add/futil.c
index 333032ade08..1d1afddc21b 100644
--- a/usr.sbin/pkg_install/add/futil.c
+++ b/usr.sbin/pkg_install/add/futil.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: futil.c,v 1.2 1996/06/04 08:43:33 niklas Exp $ */
+/* $OpenBSD: futil.c,v 1.3 1997/01/17 07:14:11 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: futil.c,v 1.2 1996/06/04 08:43:33 niklas Exp $";
+static const char *rcsid = "$OpenBSD: futil.c,v 1.3 1997/01/17 07:14:11 millert Exp $";
#endif
/*
@@ -42,7 +42,7 @@ make_hierarchy(char *dir)
else
cp1 = cp2 = dir;
while (cp2) {
- if ((cp2 = index(cp1, '/')) !=NULL )
+ if ((cp2 = strchr(cp1, '/')) !=NULL )
*cp2 = '\0';
if (fexists(dir)) {
if (!isdir(dir))
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 2eac5e98bad..83ceae813a2 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: perform.c,v 1.3 1996/12/29 12:18:28 graichen Exp $ */
+/* $OpenBSD: perform.c,v 1.4 1997/01/17 07:14:13 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: perform.c,v 1.3 1996/12/29 12:18:28 graichen Exp $";
+static const char *rcsid = "$OpenBSD: perform.c,v 1.4 1997/01/17 07:14:13 millert Exp $";
#endif
/*
@@ -62,7 +62,7 @@ pkg_perform(char **pkgs)
plist.head = plist.tail = NULL;
/* Break the package name into base and desired suffix (if any) */
- if ((cp = rindex(pkg, '.')) != NULL) {
+ if ((cp = strrchr(pkg, '.')) != NULL) {
suffix = cp + 1;
*cp = '\0';
}
@@ -205,7 +205,7 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
args[nargs++] = "-c";
args[nargs++] = "-f";
args[nargs++] = tball;
- if (index(suffix, 'z')) /* Compress/gzip? */
+ if (strchr(suffix, 'z')) /* Compress/gzip? */
args[nargs++] = "-z";
if (Dereference)
args[nargs++] = "-h";
@@ -219,7 +219,7 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
}
if (Verbose)
- if (index(suffix, 'z'))
+ if (strchr(suffix, 'z'))
printf("Creating gzip'd tar ball in '%s'\n", tball);
else
printf("Creating tar ball in '%s'\n", tball);
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c
index 1434d6feb4b..219dc8aed70 100644
--- a/usr.sbin/pkg_install/lib/file.c
+++ b/usr.sbin/pkg_install/lib/file.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: file.c,v 1.3 1996/12/29 12:19:08 graichen Exp $ */
+/* $OpenBSD: file.c,v 1.4 1997/01/17 07:14:15 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: file.c,v 1.3 1996/12/29 12:19:08 graichen Exp $";
+static const char *rcsid = "$OpenBSD: file.c,v 1.4 1997/01/17 07:14:15 millert Exp $";
#endif
/*
@@ -440,10 +440,10 @@ unpack(char *pkg, char *flist)
* compressed.
*/
if (strcmp(pkg, "-")) {
- cp = rindex(pkg, '.');
+ cp = strrchr(pkg, '.');
if (cp) {
strcpy(suffix, cp + 1);
- if (index(suffix, 'z') || index(suffix, 'Z'))
+ if (strchr(suffix, 'z') || strchr(suffix, 'Z'))
strcpy(args, "-z");
}
}
diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c
index 5cbc7aa25d7..b901fc28cdf 100644
--- a/usr.sbin/pkg_install/lib/plist.c
+++ b/usr.sbin/pkg_install/lib/plist.c
@@ -1,6 +1,6 @@
-/* $OpenBSD: plist.c,v 1.2 1996/06/04 08:43:45 niklas Exp $ */
+/* $OpenBSD: plist.c,v 1.3 1997/01/17 07:14:16 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: plist.c,v 1.2 1996/06/04 08:43:45 niklas Exp $";
+static const char *rcsid = "$OpenBSD: plist.c,v 1.3 1997/01/17 07:14:16 millert Exp $";
#endif
/*
@@ -430,7 +430,7 @@ delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs)
if (!nukedirs)
return 0;
while (cp2) {
- if ((cp2 = rindex(cp1, '/')) != NULL)
+ if ((cp2 = strrchr(cp1, '/')) != NULL)
*cp2 = '\0';
if (!isemptydir(dir))
return 0;
diff --git a/usr.sbin/pkg_install/lib/str.c b/usr.sbin/pkg_install/lib/str.c
index faaf3ba7579..899fa6003cf 100644
--- a/usr.sbin/pkg_install/lib/str.c
+++ b/usr.sbin/pkg_install/lib/str.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: str.c,v 1.2 1996/06/04 08:43:46 niklas Exp $ */
+/* $OpenBSD: str.c,v 1.3 1997/01/17 07:14:17 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: str.c,v 1.2 1996/06/04 08:43:46 niklas Exp $";
+static const char *rcsid = "$OpenBSD: str.c,v 1.3 1997/01/17 07:14:17 millert Exp $";
#endif
/*
@@ -84,7 +84,7 @@ suffix(char *str, char *suff)
char *idx;
Boolean ret = FALSE;
- idx = rindex(str, '.');
+ idx = strrchr(str, '.');
if (idx && !strcmp(idx + 1, suff))
ret = TRUE;
return ret;
@@ -96,7 +96,7 @@ nuke_suffix(char *str)
{
char *idx;
- idx = rindex(str, '.');
+ idx = strrchr(str, '.');
if (idx)
*idx = '\0'; /* Yow! Don't try this on a const! */
}
diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c
index c9622ac30e1..8091b32ac7c 100644
--- a/usr.sbin/quotaon/quotaon.c
+++ b/usr.sbin/quotaon/quotaon.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)quotaon.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: quotaon.c,v 1.7 1996/05/04 12:28:18 deraadt Exp $";
+static char *rcsid = "$Id: quotaon.c,v 1.8 1997/01/17 07:14:19 millert Exp $";
#endif /* not lint */
/*
@@ -69,14 +69,14 @@ main(argc, argv)
char **argv;
{
register struct fstab *fs;
- char *qfnp, *whoami, *rindex();
+ char *qfnp, *whoami;
long argnum, done = 0;
int i, offmode = 0, errs = 0;
extern char *optarg;
extern int optind;
int ch;
- whoami = rindex(*argv, '/') + 1;
+ whoami = strrchr(*argv, '/') + 1;
if (whoami == (char *)1)
whoami = *argv;
if (strcmp(whoami, "quotaoff") == 0)
@@ -206,7 +206,7 @@ hasquota(fs, type, qfnamep)
char **qfnamep;
{
register char *opt;
- char *cp, *index(), *strtok();
+ char *cp;
static char initname, usrname[100], grpname[100];
static char buf[BUFSIZ];
@@ -217,7 +217,7 @@ hasquota(fs, type, qfnamep)
}
strcpy(buf, fs->fs_mntops);
for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) {
- if (cp = index(opt, '='))
+ if (cp = strchr(opt, '='))
*cp++ = '\0';
if (type == USRQUOTA && strcmp(opt, usrname) == 0)
break;
diff --git a/usr.sbin/rbootd/parseconf.c b/usr.sbin/rbootd/parseconf.c
index e96e9275d73..5293098f724 100644
--- a/usr.sbin/rbootd/parseconf.c
+++ b/usr.sbin/rbootd/parseconf.c
@@ -130,7 +130,7 @@ ParseConfig()
if (*line == '\0' || *line == '#') /* ignore comment */
continue;
- if ((cp = index(line,'#')) != NULL) /* trash comments */
+ if ((cp = strchr(line,'#')) != NULL) /* trash comments */
*cp = '\0';
cp = line; /* init `cp' */
diff --git a/usr.sbin/rbootd/rmpproto.c b/usr.sbin/rbootd/rmpproto.c
index 83e2ebe74d9..13581b4dcc8 100644
--- a/usr.sbin/rbootd/rmpproto.c
+++ b/usr.sbin/rbootd/rmpproto.c
@@ -341,7 +341,7 @@ SendBootRepl(req, rconn, filelist)
* stripped file name and spoof the client into thinking that it
* really got what it wanted.
*/
- filename = (filename = rindex(filepath,'/'))? ++filename: filepath;
+ filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
/*
* Check that this is a valid boot file name.
diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c
index e3fcdb3d51f..07a5504d04c 100644
--- a/usr.sbin/repquota/repquota.c
+++ b/usr.sbin/repquota/repquota.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)repquota.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: repquota.c,v 1.8 1996/12/12 20:32:17 deraadt Exp $";
+static char *rcsid = "$Id: repquota.c,v 1.9 1997/01/17 07:14:24 millert Exp $";
#endif /* not lint */
/*
@@ -280,7 +280,7 @@ hasquota(fs, type, qfnamep)
char **qfnamep;
{
register char *opt;
- char *cp, *index(), *strtok();
+ char *cp;
static char initname, usrname[100], grpname[100];
static char buf[BUFSIZ];
@@ -291,7 +291,7 @@ hasquota(fs, type, qfnamep)
}
strcpy(buf, fs->fs_mntops);
for (opt = strtok(buf, ","); opt; opt = strtok(NULL, ",")) {
- if ((cp = index(opt, '=')))
+ if ((cp = strchr(opt, '=')))
*cp++ = '\0';
if (type == USRQUOTA && strcmp(opt, usrname) == 0)
break;
diff --git a/usr.sbin/rpc.bootparamd/bootparamd.c b/usr.sbin/rpc.bootparamd/bootparamd.c
index b92c72966b6..8a6fc90fa5f 100644
--- a/usr.sbin/rpc.bootparamd/bootparamd.c
+++ b/usr.sbin/rpc.bootparamd/bootparamd.c
@@ -6,7 +6,7 @@
* Various small changes by Theo de Raadt <deraadt@fsa.ca>
* Parser rewritten (adding YP support) by Roland McGrath <roland@frob.com>
*
- * $Id: bootparamd.c,v 1.5 1996/12/10 15:13:31 deraadt Exp $
+ * $Id: bootparamd.c,v 1.6 1997/01/17 07:14:26 millert Exp $
*/
#include <sys/types.h>
@@ -64,7 +64,6 @@ main(argc, argv)
{
SVCXPRT *transp;
int i, s, pid;
- char *rindex();
struct hostent *he;
struct stat buf;
char *optstring;
@@ -204,7 +203,7 @@ bootparamproc_getfile_1_svc(getfile, rqstp)
bp_getfile_arg *getfile;
struct svc_req *rqstp;
{
- char *where, *index();
+ char *where;
static bp_getfile_res res;
int err;
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 7f2db8784f1..bbc3add8796 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$Id: rwhod.c,v 1.5 1996/11/01 06:53:48 deraadt Exp $";
+static char rcsid[] = "$Id: rwhod.c,v 1.6 1997/01/17 07:14:28 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -145,7 +145,7 @@ main(argc, argv)
syslog(LOG_ERR, "gethostname: %m");
exit(1);
}
- if ((cp = index(myname, '.')) != NULL)
+ if ((cp = strchr(myname, '.')) != NULL)
*cp = '\0';
strncpy(mywd.wd_hostname, myname, sizeof(mywd.wd_hostname) - 1);
mywd.wd_hostname[sizeof(mywd.wd_hostname) - 1] = '\0';
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;
diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c
index a3f025be54e..2a80257c9c0 100644
--- a/usr.sbin/ypserv/makedbm/makedbm.c
+++ b/usr.sbin/ypserv/makedbm/makedbm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makedbm.c,v 1.5 1997/01/15 23:44:32 millert Exp $ */
+/* $OpenBSD: makedbm.c,v 1.6 1997/01/17 07:14:32 millert Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: makedbm.c,v 1.5 1997/01/15 23:44:32 millert Exp $";
+static char rcsid[] = "$OpenBSD: makedbm.c,v 1.6 1997/01/17 07:14:32 millert Exp $";
#endif
#include <stdio.h>
@@ -208,7 +208,7 @@ create_database(infile,database,
}
snprintf(db_outfile, sizeof(db_outfile), "%s%s", database, YPDB_SUFFIX);
- slash = rindex(database, '/');
+ slash = strrchr(database, '/');
if (slash != NULL)
slash[1] = 0; /* truncate to dir */
else