Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
0f9b1f672b68b7c3570f07b130cc5c8938b22bad
/
.
/
src
/
string
/
memrchr.c
blob: a78e9d6cafa0c700cdeb00c856ac250d932e5ab5 [
file
] [
log
] [
blame
]
#include
<string.h>
#include
"libc.h"
void
*
__memrchr
(
const
void
*
m
,
int
c
,
size_t
n
)
{
const
unsigned
char
*
s
=
m
;
c
=
(
unsigned
char
)
c
;
while
(
n
--)
if
(
s
[
n
]==
c
)
return
(
void
*)(
s
+
n
);
return
0
;
}
weak_alias
(
__memrchr
,
memrchr
);