Improved code readablity.

No functional changes.
This commit is contained in:
Ruslan Ermilov 2018-03-07 18:28:12 +03:00
parent 83dceda868
commit 84d1e7de0c
2 changed files with 12 additions and 4 deletions

View File

@ -429,7 +429,9 @@ ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name, ngx_uint_t flags)
return NULL; return NULL;
} }
v->flags &= flags | ~NGX_HTTP_VAR_WEAK; if (!(flags & NGX_HTTP_VAR_WEAK)) {
v->flags &= ~NGX_HTTP_VAR_WEAK;
}
return v; return v;
} }
@ -494,7 +496,9 @@ ngx_http_add_prefix_variable(ngx_conf_t *cf, ngx_str_t *name, ngx_uint_t flags)
return NULL; return NULL;
} }
v->flags &= flags | ~NGX_HTTP_VAR_WEAK; if (!(flags & NGX_HTTP_VAR_WEAK)) {
v->flags &= ~NGX_HTTP_VAR_WEAK;
}
return v; return v;
} }

View File

@ -161,7 +161,9 @@ ngx_stream_add_variable(ngx_conf_t *cf, ngx_str_t *name, ngx_uint_t flags)
return NULL; return NULL;
} }
v->flags &= flags | ~NGX_STREAM_VAR_WEAK; if (!(flags & NGX_STREAM_VAR_WEAK)) {
v->flags &= ~NGX_STREAM_VAR_WEAK;
}
return v; return v;
} }
@ -227,7 +229,9 @@ ngx_stream_add_prefix_variable(ngx_conf_t *cf, ngx_str_t *name,
return NULL; return NULL;
} }
v->flags &= flags | ~NGX_STREAM_VAR_WEAK; if (!(flags & NGX_STREAM_VAR_WEAK)) {
v->flags &= ~NGX_STREAM_VAR_WEAK;
}
return v; return v;
} }