diff --git a/include/libc/string.h b/include/libc/string.h index 560880a..1f95ae3 100644 --- a/include/libc/string.h +++ b/include/libc/string.h @@ -43,7 +43,6 @@ extern void *memset(void * s,int c,size_t count); extern void *memcpy(void * dest,const void *src,size_t count); extern void *memmove(void * dest,const void *src,size_t count); extern int memcmp(const void * cs,const void * ct,size_t count); -extern void *memscan(void * addr, int c, size_t size); extern char *strstr(const char * s1,const char * s2); extern void *memchr(const void *s, int c, size_t n); diff --git a/libc/string.c b/libc/string.c index e3abeb4..9afaabd 100644 --- a/libc/string.c +++ b/libc/string.c @@ -346,28 +346,6 @@ int memcmp(const void * cs,const void * ct,size_t count) return res; } -/** - * memscan - Find a character in an area of memory. - * @addr: The memory area - * @c: The byte to search for - * @size: The size of the area. - * - * returns the address of the first occurrence of @c, or 1 byte past - * the area if @c is not found - */ -void * memscan(void * addr, int c, size_t size) -{ - unsigned char * p = (unsigned char *) addr; - - while (size) { - if (*p == c) - return (void *) p; - p++; - size--; - } - return (void *) p; -} - /** * strstr - Find the first substring in a %NUL terminated string * @s1: The string to be searched