Mercurial > hg > nginx
comparison src/http/ngx_http_variables.c @ 7226:0b1eb40de6da
Improved code readablity.
No functional changes.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 07 Mar 2018 18:28:12 +0300 |
parents | 6ba68ad8b24c |
children | 81d49f85afed |
comparison
equal
deleted
inserted
replaced
7225:e80930e5e422 | 7226:0b1eb40de6da |
---|---|
427 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 427 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
428 "the duplicate \"%V\" variable", name); | 428 "the duplicate \"%V\" variable", name); |
429 return NULL; | 429 return NULL; |
430 } | 430 } |
431 | 431 |
432 v->flags &= flags | ~NGX_HTTP_VAR_WEAK; | 432 if (!(flags & NGX_HTTP_VAR_WEAK)) { |
433 v->flags &= ~NGX_HTTP_VAR_WEAK; | |
434 } | |
433 | 435 |
434 return v; | 436 return v; |
435 } | 437 } |
436 | 438 |
437 v = ngx_palloc(cf->pool, sizeof(ngx_http_variable_t)); | 439 v = ngx_palloc(cf->pool, sizeof(ngx_http_variable_t)); |
492 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 494 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
493 "the duplicate \"%V\" variable", name); | 495 "the duplicate \"%V\" variable", name); |
494 return NULL; | 496 return NULL; |
495 } | 497 } |
496 | 498 |
497 v->flags &= flags | ~NGX_HTTP_VAR_WEAK; | 499 if (!(flags & NGX_HTTP_VAR_WEAK)) { |
500 v->flags &= ~NGX_HTTP_VAR_WEAK; | |
501 } | |
498 | 502 |
499 return v; | 503 return v; |
500 } | 504 } |
501 | 505 |
502 v = ngx_array_push(&cmcf->prefix_variables); | 506 v = ngx_array_push(&cmcf->prefix_variables); |