Mercurial > hg > nginx
comparison src/http/ngx_http_variables.c @ 2536:a6d6d762c554
small optimization: " == NGX_ERROR" > " != NGX_OK"
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 24 Feb 2009 10:42:23 +0000 |
parents | c843171d5dc2 |
children | 051e9b12428e |
comparison
equal
deleted
inserted
replaced
2535:ec5825afc7eb | 2536:a6d6d762c554 |
---|---|
330 | 330 |
331 v = cmcf->variables.elts; | 331 v = cmcf->variables.elts; |
332 | 332 |
333 if (v == NULL) { | 333 if (v == NULL) { |
334 if (ngx_array_init(&cmcf->variables, cf->pool, 4, | 334 if (ngx_array_init(&cmcf->variables, cf->pool, 4, |
335 sizeof(ngx_http_variable_t)) == NGX_ERROR) | 335 sizeof(ngx_http_variable_t)) |
336 != NGX_OK) | |
336 { | 337 { |
337 return NGX_ERROR; | 338 return NGX_ERROR; |
338 } | 339 } |
339 | 340 |
340 } else { | 341 } else { |
1070 == NULL) | 1071 == NULL) |
1071 { | 1072 { |
1072 return NGX_ERROR; | 1073 return NGX_ERROR; |
1073 } | 1074 } |
1074 | 1075 |
1075 if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) | 1076 if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) { |
1076 == NGX_ERROR) | |
1077 { | |
1078 return NGX_ERROR; | 1077 return NGX_ERROR; |
1079 } | 1078 } |
1080 | 1079 |
1081 v->len = path.len; | 1080 v->len = path.len; |
1082 v->valid = 1; | 1081 v->valid = 1; |
1111 return NGX_ERROR; | 1110 return NGX_ERROR; |
1112 } | 1111 } |
1113 | 1112 |
1114 path.data[path.len - 1] = '\0'; | 1113 path.data[path.len - 1] = '\0'; |
1115 | 1114 |
1116 if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) | 1115 if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) { |
1117 == NGX_ERROR) | |
1118 { | |
1119 return NGX_ERROR; | 1116 return NGX_ERROR; |
1120 } | 1117 } |
1121 } | 1118 } |
1122 | 1119 |
1123 if (ngx_realpath(path.data, real) == NULL) { | 1120 if (ngx_realpath(path.data, real) == NULL) { |