/* returns the address of the first occurrence of  */
void* memchr(const void *s, int c, size_t n)
/* returns the address of the first occurrence of  */
void* memchr(const void *s, int c, size_t n)
{
	const unsigned char *p = s;
	while (n-- != 0) {
        	if ((unsigned char)c == *p++) {
			return (void *)(p - 1);
		}
	}
	return NULL;
}