diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-12-14 19:35:37 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-12-14 19:35:37 +0000 |
commit | cd04ca3546f64deeabcbd477c5eb627f1af71685 (patch) | |
tree | 4a234fffc8eecc35b431caa19d357cb58aaf2858 /src | |
parent | fac3b341dae56adccc1ffa7e8147b3694b209381 (diff) | |
download | nginx-cd04ca3546f64deeabcbd477c5eb627f1af71685.tar.gz nginx-cd04ca3546f64deeabcbd477c5eb627f1af71685.zip |
Geo: improved ngx_http_geo_block() code readability.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_geo_module.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index bdad969a1..8d2679db5 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -303,7 +303,6 @@ static char * ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *rv; - void **p; size_t len; ngx_str_t *value, name; ngx_uint_t i; @@ -402,8 +401,8 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - p = (void **) ngx_cpymem(ctx.high.low[i], a->elts, len); - *p = NULL; + ngx_memcpy(ctx.high.low[i], a->elts, len); + ctx.high.low[i][a->nelts].value = NULL; ctx.data_size += len + sizeof(void *); } |