From 80cead52ebd56e2eb45c9c4ef622f59e43170b22 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Thu, 15 Apr 2010 16:42:59 +0000 Subject: [PATCH] Remove unused strstr() Signed-off-by: Blue Swirl git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@746 f158a5a8-5612-0410-a976-696ce0be7e32 --- include/libc/string.h | 1 - libc/string.c | 22 ---------------------- 2 files changed, 23 deletions(-) diff --git a/include/libc/string.h b/include/libc/string.h index 1f95ae3..e3086ae 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 char *strstr(const char * s1,const char * s2); extern void *memchr(const void *s, int c, size_t n); extern char *strdup( const char *str ); diff --git a/libc/string.c b/libc/string.c index 9afaabd..199878e 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; } -/** - * strstr - Find the first substring in a %NUL terminated string - * @s1: The string to be searched - * @s2: The string to search for - */ -char * strstr(const char * s1,const char * s2) -{ - int l1, l2; - - l2 = strlen(s2); - if (!l2) - return (char *) s1; - l1 = strlen(s1); - while (l1 >= l2) { - l1--; - if (!memcmp(s1,s2,l2)) - return (char *) s1; - s1++; - } - return NULL; -} - /** * memchr - Find a character in an area of memory. * @s: The memory area