From e3693e3b3789fcb738a7f25997c8d86f0504477c Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 24 Jun 2010 13:16:19 +0000 Subject: [PATCH] break cycle early --- src/http/modules/ngx_http_geo_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 40c11f25f..8d96ff202 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -166,10 +166,10 @@ ngx_http_geo_range_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, n = addr & 0xffff; for (i = 0; i < ctx->u.high->low[addr >> 16].n; i++) { - if (n >= (ngx_uint_t) range[i].start - && n <= (ngx_uint_t) range[i].end) + if (n >= (ngx_uint_t) range[i].start && n <= (ngx_uint_t) range[i].end) { *v = *range[i].value; + break; } }