aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Fullaondo <truthbk>2016-03-13 01:19:20 -0500
committerDaniel Stenberg <daniel@haxx.se>2016-03-14 08:16:52 +0100
commitc0717a70599bede62b3f9b1ca5892daa87b662e5 (patch)
tree2c3d2c9140884c24697b28a61b1cde130f036fb5
parent5dc43b975bcd1f83acd04eaf9c6a314576aa6d75 (diff)
multi hash: ensure modulo performed on curl_socket_t
Closes #712
-rw-r--r--lib/multi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 4411a1814..068ac48a1 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -231,15 +231,15 @@ static size_t fd_key_compare(void *k1, size_t k1_len, void *k2, size_t k2_len)
{
(void) k1_len; (void) k2_len;
- return (*((int *) k1)) == (*((int *) k2));
+ return (*((curl_socket_t *) k1)) == (*((curl_socket_t *) k2));
}
static size_t hash_fd(void *key, size_t key_length, size_t slots_num)
{
- int fd = *((int *) key);
+ curl_socket_t fd = *((curl_socket_t *) key);
(void) key_length;
- return (fd % (int)slots_num);
+ return (fd % slots_num);
}
/*