From 7d22ce5573952dec6e3fa724d5e6f071cf8947ff Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 28 Sep 2009 16:05:20 +0000 Subject: libcurl private function Curl_memrchr() now in curl_memrchr.c and curl_memrchr.h --- lib/cookie.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/cookie.c') diff --git a/lib/cookie.c b/lib/cookie.c index 13941857c..6b19ab166 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -97,6 +97,7 @@ Example set of cookies: #include "share.h" #include "strtoofft.h" #include "rawstr.h" +#include "curl_memrchr.h" /* The last #include file should be: */ #include "memdebug.h" @@ -168,23 +169,6 @@ static void strstore(char **str, const char *newstr) } -/* - * The memrchr() function is like the memchr() function, except that it - * searches backwards from the end of the n bytes pointed to by s instead of - * forwards from the front. - * - * Exists in glibc but is not widely available on other systems. - */ -static void *memrchr(const char *s, int c, size_t n) -{ - while(n--) { - if(s[n] == c) - return &s[n]; - } - return NULL; -} - - /**************************************************************************** * * Curl_cookie_add() -- cgit v1.2.3