repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
syslog: revert LOG_FAC/LOG_FACMASK changes
[musl.git]
/
src
/
string
/
memrchr.c
blob
e51748b805654c2fc0879be6829cfd38fe737cda
1
#include <string.h>
2
3
void
*
__memrchr
(
const void
*
m
,
int
c
,
size_t
n
)
4
{
5
const unsigned char
*
s
=
m
;
6
c
= (
unsigned char
)
c
;
7
while
(
n
--)
if
(
s
[
n
]==
c
)
return
(
void
*)(
s
+
n
);
8
return
0
;
9
}
10
11
weak_alias
(
__memrchr
,
memrchr
);