aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-01-27 03:43:34 +0000
committerYang Tse <yangsita@gmail.com>2010-01-27 03:43:34 +0000
commitbbefdf88fdd9c0a2c36966960b360a5a7e9bf764 (patch)
tree85f35bfae6142033de28b15c9e80020283749770 /lib/cookie.c
parent06c96d01d2c0b8e069bbf8efa0894a0c002e3553 (diff)
fix compiler warning
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 3a3edd516..e117b0869 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -783,7 +783,7 @@ static int cookie_sort(const void *p1, const void *p2)
size_t l1 = c1->path?strlen(c1->path):0;
size_t l2 = c2->path?strlen(c2->path):0;
- return l2 - l1;
+ return (int)(l2 - l1);
}
/*****************************************************************************
@@ -806,7 +806,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
struct Cookie *co;
time_t now = time(NULL);
struct Cookie *mainco=NULL;
- int matches=0;
+ size_t matches = 0;
if(!c || !c->cookies)
return NULL; /* no cookie struct or no cookies in the struct */
@@ -872,7 +872,7 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
once, the longest specified path version comes first. To make this
the swiftest way, we just sort them all based on path length. */
struct Cookie **array;
- int i;
+ size_t i;
/* alloc an array and store all cookie pointers */
array = (struct Cookie **)malloc(sizeof(struct Cookie *) * matches);