diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-06-24 13:16:19 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-06-24 13:16:19 +0000 |
commit | e3693e3b3789fcb738a7f25997c8d86f0504477c (patch) | |
tree | 74aba1bdf89668b25979ed46d4814dbc0ebaeec2 /src/http/modules/ngx_http_geo_module.c | |
parent | aa6936e61a43169bc7ef080e475399f4a514131c (diff) | |
download | nginx-e3693e3b3789fcb738a7f25997c8d86f0504477c.tar.gz nginx-e3693e3b3789fcb738a7f25997c8d86f0504477c.zip |
break cycle early
Diffstat (limited to 'src/http/modules/ngx_http_geo_module.c')
-rw-r--r-- | src/http/modules/ngx_http_geo_module.c | 4 |
1 files 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; } } |