aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-09-28 16:05:20 +0000
committerYang Tse <yangsita@gmail.com>2009-09-28 16:05:20 +0000
commit7d22ce5573952dec6e3fa724d5e6f071cf8947ff (patch)
treedebae4512e0147c88ac3418359f443efa48b8704 /lib/cookie.c
parentb64dd3c63d8f1545690ae9fed1c3a33fe8780303 (diff)
libcurl private function Curl_memrchr() now in curl_memrchr.c and curl_memrchr.h
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c18
1 files changed, 1 insertions, 17 deletions
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()