forked from KolibriOS/kolibrios
e08c6968ef
git-svn-id: svn://kolibrios.org@9558 a494cfbc-eb01-0410-851d-a64ba20cac60
13 lines
210 B
C
13 lines
210 B
C
/* memrchr.c from musl
|
|
*/
|
|
|
|
#include <string.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;
|
|
}
|