projects
/
oweals
/
musl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
reduce some ridiculously large spin counts
[oweals/musl.git]
/
src
/
string
/
strrchr.c
diff --git
a/src/string/strrchr.c
b/src/string/strrchr.c
index 31c8e0b8d2108e36cb391111346f6824511bccc9..9c683087ce165cec175ea372bfaab6dfd34f42f8 100644
(file)
--- a/
src/string/strrchr.c
+++ b/
src/string/strrchr.c
@@
-1,9
+1,8
@@
#include <string.h>
+void *__memrchr(const void *, int, size_t);
+
char *strrchr(const char *s, int c)
{
- const char *p;
- c = (char)c;
- for (p=s+strlen(s); p>=s && *p!=c; p--);
- return p>=s ? (char *)p : 0;
+ return __memrchr(s, c, strlen(s));
}