[OpenBIOS] [commit] r746 - in trunk/openbios-devel: include/libc libc
repository service
svn at openbios.org
Thu Apr 15 18:42:59 CEST 2010
Author: blueswirl
Date: Thu Apr 15 18:42:59 2010
New Revision: 746
URL: http://tracker.coreboot.org/trac/openbios/changeset/746
Log:
Remove unused strstr()
Signed-off-by: Blue Swirl <blauwirbel at gmail.com>
Modified:
trunk/openbios-devel/include/libc/string.h
trunk/openbios-devel/libc/string.c
Modified: trunk/openbios-devel/include/libc/string.h
==============================================================================
--- trunk/openbios-devel/include/libc/string.h Thu Apr 15 18:42:56 2010 (r745)
+++ trunk/openbios-devel/include/libc/string.h Thu Apr 15 18:42:59 2010 (r746)
@@ -43,7 +43,6 @@
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 );
Modified: trunk/openbios-devel/libc/string.c
==============================================================================
--- trunk/openbios-devel/libc/string.c Thu Apr 15 18:42:56 2010 (r745)
+++ trunk/openbios-devel/libc/string.c Thu Apr 15 18:42:59 2010 (r746)
@@ -347,28 +347,6 @@
}
/**
- * 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
* @c: The byte to search for
More information about the OpenBIOS
mailing list