From 27db2b19007f2fbcac58d75c19577301226d4e6c Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 24 Aug 2007 15:28:06 +0000 Subject: [PATCH] fix ip_hash on 64-bit platform --- src/http/modules/ngx_http_upstream_ip_hash_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/modules/ngx_http_upstream_ip_hash_module.c b/src/http/modules/ngx_http_upstream_ip_hash_module.c index 3ef424921..1c002e532 100644 --- 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_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)) {