summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-10-29 14:20:24 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-10-29 14:20:24 +0000
commit7fed0a874e0bb2037f7a9b50d16864988d1538fe (patch)
tree962a71c1b2ada86ab3a2f9a3aec3a2761de5a033 /src
parent1cc4b91b2b1dab706f635a42854998ac6e47c71a (diff)
change index/rindex to strchr/strrchr
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1361 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/os/get_krbhst.c6
-rw-r--r--src/lib/krb5/os/hst_realm.c2
-rw-r--r--src/lib/krb5/os/kuserok.c2
-rw-r--r--src/lib/krb5/os/read_pwd.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/krb5/os/get_krbhst.c b/src/lib/krb5/os/get_krbhst.c
index f24bd5eba..6845e9136 100644
--- a/src/lib/krb5/os/get_krbhst.c
+++ b/src/lib/krb5/os/get_krbhst.c
@@ -105,11 +105,11 @@ char ***hostlist;
break;
}
/* chop off remainder of line */
- if (cp = index(rethlist[hlindex], ' '))
+ if (cp = strchr(rethlist[hlindex], ' '))
*cp = '\0';
- if (cp = index(rethlist[hlindex], '\t'))
+ if (cp = strchr(rethlist[hlindex], '\t'))
*cp = '\0';
- if (cp = index(rethlist[hlindex], '\n'))
+ if (cp = strchr(rethlist[hlindex], '\n'))
*cp = '\0';
if (++hlindex >= hlsize) {
/* need larger pointer array */
diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c
index 0c6cb0e4a..20a184fad 100644
--- a/src/lib/krb5/os/hst_realm.c
+++ b/src/lib/krb5/os/hst_realm.c
@@ -89,7 +89,7 @@ char ***realmsp;
if (!(retrealms = (char **)calloc(2, sizeof(*retrealms))))
return ENOMEM;
- domain = index(host, '.');
+ domain = strchr(host, '.');
/* prepare default */
if (domain) {
diff --git a/src/lib/krb5/os/kuserok.c b/src/lib/krb5/os/kuserok.c
index eb26f1c75..dc3efe19c 100644
--- a/src/lib/krb5/os/kuserok.c
+++ b/src/lib/krb5/os/kuserok.c
@@ -110,7 +110,7 @@ const char *luser;
linebuf[BUFSIZ-1] = '\0';
newline = NULL;
/* nuke the newline if it exists */
- if (newline = index(linebuf, '\n'))
+ if (newline = strchr(linebuf, '\n'))
*newline = '\0';
if (!strcmp(linebuf, princname)) {
isok = TRUE;
diff --git a/src/lib/krb5/os/read_pwd.c b/src/lib/krb5/os/read_pwd.c
index d1f2cd696..8d3118de3 100644
--- a/src/lib/krb5/os/read_pwd.c
+++ b/src/lib/krb5/os/read_pwd.c
@@ -119,7 +119,7 @@ int *size_return;
/* fgets always null-terminates the returned string */
/* replace newline with null */
- if (ptr = index(return_pwd, '\n'))
+ if (ptr = strchr(return_pwd, '\n'))
*ptr = '\0';
else /* flush rest of input line */
do {
@@ -146,7 +146,7 @@ int *size_return;
}
(void) putchar('\n');
- if (ptr = index(readin_string, '\n'))
+ if (ptr = strchr(readin_string, '\n'))
*ptr = '\0';
else /* need to flush */
do {