aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_geo_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_geo_module.c')
-rw-r--r--src/http/modules/ngx_http_geo_module.c4
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;
}
}