mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 21:52:41 +08:00
fix ip_hash on 64-bit platform
This commit is contained in:
parent
43f3aead14
commit
27db2b1900
@ -160,7 +160,7 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
|
|||||||
p = hash % iphp->rrp.peers->number;
|
p = hash % iphp->rrp.peers->number;
|
||||||
|
|
||||||
n = p / (8 * sizeof(uintptr_t));
|
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)) {
|
if (!(iphp->rrp.tried[n] & m)) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user