diff options
author | Richard Basch <probe@mit.edu> | 1993-09-24 12:22:09 +0000 |
---|---|---|
committer | Richard Basch <probe@mit.edu> | 1993-09-24 12:22:09 +0000 |
commit | 5d03c68450ed2d65b9fcbc6a8756b6223304f11c (patch) | |
tree | 07f2386678481fa83b90b89b39e13bb87b25e3ec | |
parent | 3e8ddd52a76f85f347de704e72fb5196956fdf5d (diff) |
Replaced index/rindex with strchr/strrchr (ANSI)
-rw-r--r-- | lib/ZVariables.c | 2 | ||||
-rw-r--r-- | lib/acl_files.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/ZVariables.c b/lib/ZVariables.c index ffa918d..e006ac6 100644 --- a/lib/ZVariables.c +++ b/lib/ZVariables.c @@ -184,7 +184,7 @@ static int varline(bfr, var) return(0); /* var is not the var in bfr ==> no match */ - cp = index(bfr, '='); + cp = strchr(bfr, '='); if (!cp) return(0); cp++; diff --git a/lib/acl_files.c b/lib/acl_files.c index 948a668..c259957 100644 --- a/lib/acl_files.c +++ b/lib/acl_files.c @@ -28,6 +28,7 @@ static char rcsid_acl_files_c[] = "$Id$"; #include <zephyr/zephyr.h> #include <strings.h> #include <sys/file.h> +#include <fcntl.h> #include <sys/stat.h> #include <ctype.h> #include <sys/param.h> /* for MAXHOSTNAMELEN */ @@ -68,8 +69,8 @@ char *canon; char *dot, *atsign, *end; int len; - dot = index(principal, INST_SEP); - atsign = index(principal, REALM_SEP); + dot = strchr(principal, INST_SEP); + atsign = strchr(principal, REALM_SEP); /* Maybe we're done already */ if(dot != NULL && atsign != NULL) { @@ -477,8 +478,8 @@ char *principal; return 1; /* Try the wildcards */ - realm = index(canon, REALM_SEP); - *index(canon, INST_SEP) = '\0'; /* Chuck the instance */ + realm = strchr(canon, REALM_SEP); + *strchr(canon, INST_SEP) = '\0'; /* Chuck the instance */ sprintf(buf, "%s.*%s", canon, realm); if(acl_exact_match(acl, buf)) return 1; |