aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-04-06 14:19:39 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-04-06 23:42:25 +0200
commitdd03e8c281582af454fabfb4a666a5b232d518aa (patch)
tree2e6ee4ec36819f0c7e56abdf7c4b26a5d6a41c1d /lib/cookie.c
parent67bd4ab19e2903b45b66278956801a681fc35520 (diff)
hash: calculate sizes with size_t instead of longs
... since they return size_t anyway! closes #2462
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 5aa959690..9c90c2a38 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -270,11 +270,11 @@ static const char *get_top_domain(const char * const domain, size_t *outlen)
static size_t cookie_hash_domain(const char *domain, const size_t len)
{
const char *end = domain + len;
- unsigned long h = 5381;
+ size_t h = 5381;
while(domain < end) {
h += h << 5;
- h ^= (unsigned long) Curl_raw_toupper(*domain++);
+ h ^= Curl_raw_toupper(*domain++);
}
return (h % COOKIE_HASH_SIZE);