aboutsummaryrefslogtreecommitdiffstats
path: root/rawmemrchr.c
blob: 5ce374d0e3c852ef26ee5c725a3c968e42fe5d20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* See LICENSE file for copyright and license details. */
#include "libsimple.h"


void *
libsimple_rawmemrchr(const void *s_, int c, size_t n)
{
	char *s = *(char **)(void *)&s_;
	while ((int)s[--n] != c);
	return &s[n];
}