comparison src/stream/ngx_stream_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 924b6ef942bf
children 06b01840bd42
comparison
equal deleted inserted replaced
7225:e80930e5e422 7226:0b1eb40de6da
159 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 159 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
160 "the duplicate \"%V\" variable", name); 160 "the duplicate \"%V\" variable", name);
161 return NULL; 161 return NULL;
162 } 162 }
163 163
164 v->flags &= flags | ~NGX_STREAM_VAR_WEAK; 164 if (!(flags & NGX_STREAM_VAR_WEAK)) {
165 v->flags &= ~NGX_STREAM_VAR_WEAK;
166 }
165 167
166 return v; 168 return v;
167 } 169 }
168 170
169 v = ngx_palloc(cf->pool, sizeof(ngx_stream_variable_t)); 171 v = ngx_palloc(cf->pool, sizeof(ngx_stream_variable_t));
225 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 227 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
226 "the duplicate \"%V\" variable", name); 228 "the duplicate \"%V\" variable", name);
227 return NULL; 229 return NULL;
228 } 230 }
229 231
230 v->flags &= flags | ~NGX_STREAM_VAR_WEAK; 232 if (!(flags & NGX_STREAM_VAR_WEAK)) {
233 v->flags &= ~NGX_STREAM_VAR_WEAK;
234 }
231 235
232 return v; 236 return v;
233 } 237 }
234 238
235 v = ngx_array_push(&cmcf->prefix_variables); 239 v = ngx_array_push(&cmcf->prefix_variables);