source: trunk/sys/dietlibc/memchr.c @ 144

Last change on this file since 144 was 1, checked in by alain, 7 years ago

First import

File size: 245 bytes
Line 
1#include <string.h>
2#include "dietfeatures.h"
3#include "dietstring.h"
4
5void* memchr(const void *s, int c, size_t n) {
6  const unsigned char *pc = (unsigned char *) s;
7  for (;n--;pc++)
8    if (*pc == c)
9      return ((void *) pc);
10  return 0;
11}
Note: See TracBrowser for help on using the repository browser.