summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/files.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-01-17 07:10:42 +0000
committermillert <millert@openbsd.org>1997-01-17 07:10:42 +0000
commit180acc8f08201633decf63424d1317ede80af916 (patch)
treeb64a266b7ea344cb2be4663edaffe52d9eb8de8c /usr.sbin/config/files.c
parentlite2 daily + our changes. We can remove old tmp files now that fts(3) (diff)
downloadwireguard-openbsd-180acc8f08201633decf63424d1317ede80af916.tar.xz
wireguard-openbsd-180acc8f08201633decf63424d1317ede80af916.zip
r?index -> strr?chr
Diffstat (limited to 'usr.sbin/config/files.c')
-rw-r--r--usr.sbin/config/files.c6
1 files changed, 3 insertions, 3 deletions
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);