diff src/http/modules/ngx_http_upstream_ip_hash_module.c @ 1416:ad2311c943a3

fix ip_hash on 64-bit platform
author Igor Sysoev <igor@sysoev.ru>
date Fri, 24 Aug 2007 15:28:06 +0000
parents be2b895d31e0
children b23a80f9a7b8
line wrap: on
line diff
--- a/src/http/modules/ngx_http_upstream_ip_hash_module.c
+++ b/src/http/modules/ngx_http_upstream_ip_hash_module.c
@@ -160,7 +160,7 @@ ngx_http_upstream_get_ip_hash_peer(ngx_p
         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)) {