]> git.kaiwu.me - nginx.git/commitdiff
fix ip_hash on 64-bit platform
authorIgor Sysoev <igor@sysoev.ru>
Fri, 24 Aug 2007 15:28:06 +0000 (15:28 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 24 Aug 2007 15:28:06 +0000 (15:28 +0000)
src/http/modules/ngx_http_upstream_ip_hash_module.c

index 3ef424921b15b1012d7ebc9beaffe5cfc9a17995..1c002e532a4c234d28354e41659874e99377be8c 100644 (file)
@@ -160,7 +160,7 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
         p = hash % iphp->rrp.peers->number;
 
         n = p / (8 * sizeof(uintptr_t));
-        m = 1 << p % (8 * sizeof(uintptr_t));
+        m = (uintptr_t) 1 << p % (8 * sizeof(uintptr_t));
 
         if (!(iphp->rrp.tried[n] & m)) {