2001-05-04 Earnie Boyd <earnie@users.sourceforge.net>
* libc/string/strrchr.c: Use strchr for the speed improvements.
This commit is contained in:
parent
69b218bf24
commit
8b3bcfbab9
|
@ -1,3 +1,7 @@
|
||||||
|
2001-05-04 Earnie Boyd <earnie@users.sourceforge.net>
|
||||||
|
|
||||||
|
* libc/string/strrchr.c: Use strchr for the speed improvements.
|
||||||
|
|
||||||
2001-05-01 Jeff Johnston <jjohnstn@redhat.com>
|
2001-05-01 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have
|
* libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have
|
||||||
|
|
|
@ -41,20 +41,18 @@ _DEFUN (strrchr, (s, i),
|
||||||
int i)
|
int i)
|
||||||
{
|
{
|
||||||
_CONST char *last = NULL;
|
_CONST char *last = NULL;
|
||||||
char c = i;
|
|
||||||
|
|
||||||
while (*s)
|
if (i)
|
||||||
{
|
{
|
||||||
if (*s == c)
|
while (s=strchr(s, i))
|
||||||
{
|
{
|
||||||
last = s;
|
last = s;
|
||||||
}
|
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (*s == c)
|
else
|
||||||
{
|
{
|
||||||
last = s;
|
last = strchr(s, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (char *) last;
|
return (char *) last;
|
||||||
|
|
Loading…
Reference in New Issue