summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/hash.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-18 14:16:50 (GMT)
committerBrad King <brad.king@kitware.com>2018-05-18 14:16:50 (GMT)
commit3e913b819d8d8118d5e8dc3b7289f622e9ca92e5 (patch)
tree82c19f5ec814c84b986e54e3fc6fa0a83622fd81 /Utilities/cmcurl/lib/hash.c
parentf3c73b878c594d40119e480ca1074e733d7ba1ce (diff)
parentd431136e029c652f5913bcebeaab3b9236b114c4 (diff)
downloadCMake-3e913b819d8d8118d5e8dc3b7289f622e9ca92e5.zip
CMake-3e913b819d8d8118d5e8dc3b7289f622e9ca92e5.tar.gz
CMake-3e913b819d8d8118d5e8dc3b7289f622e9ca92e5.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2018-05-15 (cb013830)
Diffstat (limited to 'Utilities/cmcurl/lib/hash.c')
-rw-r--r--Utilities/cmcurl/lib/hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/cmcurl/lib/hash.c b/Utilities/cmcurl/lib/hash.c
index c99b1b6..15a128f 100644
--- a/Utilities/cmcurl/lib/hash.c
+++ b/Utilities/cmcurl/lib/hash.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -261,11 +261,11 @@ size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num)
{
const char *key_str = (const char *) key;
const char *end = key_str + key_length;
- unsigned long h = 5381;
+ size_t h = 5381;
while(key_str < end) {
h += h << 5;
- h ^= (unsigned long) *key_str++;
+ h ^= *key_str++;
}
return (h % slots_num);