Geo: improved ngx_http_geo_block() code readability.

This commit is contained in:
Ruslan Ermilov 2012-12-14 19:35:37 +00:00
parent fac3b341da
commit cd04ca3546

View File

@ -303,7 +303,6 @@ static char *
ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{ {
char *rv; char *rv;
void **p;
size_t len; size_t len;
ngx_str_t *value, name; ngx_str_t *value, name;
ngx_uint_t i; 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; return NGX_CONF_ERROR;
} }
p = (void **) ngx_cpymem(ctx.high.low[i], a->elts, len); ngx_memcpy(ctx.high.low[i], a->elts, len);
*p = NULL; ctx.high.low[i][a->nelts].value = NULL;
ctx.data_size += len + sizeof(void *); ctx.data_size += len + sizeof(void *);
} }