Skip to content

Commit 2131c73

Browse files
committed
Fix best_sched_score initialisation on 64-bit architectures
Thanks to Victor Lavrenko for reporting, analysing and providing a patch.
1 parent dc897c0 commit 2131c73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ngx_http_upstream_fair_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ ngx_http_upstream_choose_fair_peer_busy(ngx_peer_connection_t *pc,
792792
ngx_uint_t weight_mode = fp->peers->weight_mode;
793793
ngx_uint_t best_idx = NGX_PEER_INVALID;
794794
ngx_uint_t sched_score;
795-
ngx_uint_t best_sched_score = ~0U;
795+
ngx_uint_t best_sched_score = ~0UL;
796796

797797
/*
798798
* calculate sched scores for all the peers, choosing the lowest one

0 commit comments

Comments
 (0)