svn commit: trunk/uClibc/libc/inet/rpc
psm at uclibc.org
psm at uclibc.org
Thu Nov 10 15:09:32 UTC 2005
Author: psm
Date: 2005-11-10 07:09:21 -0800 (Thu, 10 Nov 2005)
New Revision: 12204
Log:
Another s/index/strchr/
Modified:
trunk/uClibc/libc/inet/rpc/getrpcent.c
Changeset:
Modified: trunk/uClibc/libc/inet/rpc/getrpcent.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/getrpcent.c 2005-11-10 14:43:07 UTC (rev 12203)
+++ trunk/uClibc/libc/inet/rpc/getrpcent.c 2005-11-10 15:09:21 UTC (rev 12204)
@@ -166,8 +166,8 @@
{
char *s1, *s2;
- s1 = index(s, ' ');
- s2 = index(s, '\t');
+ s1 = strchr(s, ' ');
+ s2 = strchr(s, '\t');
if (s1) {
if (s2)
return (s1 < s2) ? s1 : s2;
@@ -187,9 +187,9 @@
d->line[strlen(p)-1] = '\n';
if (*p == '#')
return __get_next_rpcent(d);
- cp = index(p, '#');
+ cp = strchr(p, '#');
if (cp == NULL) {
- cp = index(p, '\n');
+ cp = strchr(p, '\n');
if (cp == NULL)
return __get_next_rpcent(d);
}
@@ -200,9 +200,9 @@
else
return __get_next_rpcent(d);
#else
- cp = index(p, ' ');
+ cp = strchr(p, ' ');
if (cp == NULL) {
- cp = index(p, '\t');
+ cp = strchr(p, '\t');
if (cp == NULL)
return __get_next_rpcent(d);
}
@@ -218,11 +218,11 @@
if ((cp = firstwhite(cp)))
*cp++ = '\0';
#else
- cp = index(p, ' ');
+ cp = strchr(p, ' ');
if (cp != NULL)
*cp++ = '\0';
else {
- cp = index(p, '\t');
+ cp = strchr(p, '\t');
if (cp != NULL)
*cp++ = '\0';
}
@@ -238,11 +238,11 @@
if ((cp = firstwhite(cp)))
*cp++ = '\0';
#else
- cp = index(p, ' ');
+ cp = strchr(p, ' ');
if (cp != NULL)
*cp++ = '\0';
else {
- cp = index(p, '\t');
+ cp = strchr(p, '\t');
if (cp != NULL)
*cp++ = '\0';
}
More information about the uClibc-cvs
mailing list