diff src/http/ngx_http_upstream_round_robin.c @ 302:9b7db0df50f0 NGINX_0_5_21

nginx 0.5.21 *) Bugfix: if server has more than about ten locations, then regex locations might be choosen not in that order as they were specified. *) Bugfix: a worker process may got caught in an endless loop on 64-bit platform, if the 33-rd or next in succession backend has failed. Thanks to Anton Povarov. *) Bugfix: a bus error might occur on Solaris/sparc64 if the PCRE library was used. Thanks to Andrei Nigmatulin. *) Bugfix: in the HTTPS protocol in the "proxy_pass" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 28 May 2007 00:00:00 +0400
parents 251bcd11a5b8
children 1e9e2c5e7c14
line wrap: on
line diff
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -215,7 +215,7 @@ ngx_http_upstream_get_round_robin_peer(n
                 rrp->current = rrp->peers->current;
 
                 n = rrp->current / (8 * sizeof(uintptr_t));
-                m = 1 << rrp->current % (8 * sizeof(uintptr_t));
+                m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t));
 
                 if (!(rrp->tried[n] & m)) {
                     peer = &rrp->peers->peer[rrp->current];
@@ -268,7 +268,7 @@ ngx_http_upstream_get_round_robin_peer(n
         } else {
             for ( ;; ) {
                 n = rrp->current / (8 * sizeof(uintptr_t));
-                m = 1 << rrp->current % (8 * sizeof(uintptr_t));
+                m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t));
 
                 if (!(rrp->tried[n] & m)) {