From fd569ca2f8f6b041d1ce029ee8880f22facd6f6a Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Thu, 15 Apr 2010 16:42:51 +0000 Subject: [PATCH] Remove unused strspn() Signed-off-by: Blue Swirl git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@743 f158a5a8-5612-0410-a976-696ce0be7e32 --- include/libc/string.h | 1 - libc/string.c | 25 ------------------------- 2 files changed, 26 deletions(-) diff --git a/include/libc/string.h b/include/libc/string.h index 2666c23..330326f 100644 --- a/include/libc/string.h +++ b/include/libc/string.h @@ -37,7 +37,6 @@ extern char *strchr(const char * s, int c); extern char *strrchr(const char * s, int c); extern size_t strlen(const char * s); extern size_t strnlen(const char * s, size_t count); -extern size_t strspn(const char *s, const char *accept); extern char *strpbrk(const char * cs,const char * ct); extern char *strsep(char **s, const char *ct); extern void *memset(void * s,int c,size_t count); diff --git a/libc/string.c b/libc/string.c index a193c5e..b7f1bd3 100644 --- a/libc/string.c +++ b/libc/string.c @@ -220,31 +220,6 @@ size_t strnlen(const char * s, size_t count) return sc - s; } -/** - * strspn - Calculate the length of the initial substring of @s which only - * contain letters in @accept - * @s: The string to be searched - * @accept: The string to search for - */ -size_t strspn(const char *s, const char *accept) -{ - const char *p; - const char *a; - size_t count = 0; - - for (p = s; *p != '\0'; ++p) { - for (a = accept; *a != '\0'; ++a) { - if (*p == *a) - break; - } - if (*a == '\0') - return count; - ++count; - } - - return count; -} - /** * strpbrk - Find the first occurrence of a set of characters * @cs: The string to be searched