summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-04-15 16:43:01 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-04-15 16:43:01 +0000
commita2f14b47b86088e14ccf59cbecf006166e108f35 (patch)
tree5bada357d98efe9c2eb2c889addcb14b2ce16a5d
parent80cead52ebd56e2eb45c9c4ef622f59e43170b22 (diff)
downloadqemu-openbios-a2f14b47b86088e14ccf59cbecf006166e108f35.tar.gz
Remove unused memchr()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@747 f158a5a8-5612-0410-a976-696ce0be7e32
-rw-r--r--include/libc/string.h1
-rw-r--r--libc/string.c21
2 files changed, 0 insertions, 22 deletions
diff --git a/include/libc/string.h b/include/libc/string.h
index e3086ae3..0e72f8d7 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 *memchr(const void *s, int c, size_t n);
extern char *strdup( const char *str );
extern int strcasecmp( const char *cs, const char *ct );
diff --git a/libc/string.c b/libc/string.c
index 199878e3..8f62bd7b 100644
--- a/libc/string.c
+++ b/libc/string.c
@@ -346,27 +346,6 @@ int memcmp(const void * cs,const void * ct,size_t count)
return res;
}
-/**
- * memchr - Find a character in an area of memory.
- * @s: The memory area
- * @c: The byte to search for
- * @n: The size of the area.
- *
- * returns the address of the first occurrence of @c, or %NULL
- * if @c is not found
- */
-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;
-}
-
-
char *
strdup( const char *str )
{