Mercurial > hg > nginx
changeset 4967:a9d60fafaa85
Geo: improved ngx_http_geo_block() code readability.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 14 Dec 2012 19:35:37 +0000 |
parents | c821975c9068 |
children | 90d8c3400769 |
files | src/http/modules/ngx_http_geo_module.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_geo_module.c Fri Dec 14 15:24:24 2012 +0000 +++ b/src/http/modules/ngx_http_geo_module.c Fri Dec 14 19:35:37 2012 +0000 @@ -303,7 +303,6 @@ 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 @@ 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 *); }