]> git.kaiwu.me - nginx.git/commitdiff
Style improved after 12dd27b74117.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 20 Aug 2013 17:33:43 +0000 (21:33 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 20 Aug 2013 17:33:43 +0000 (21:33 +0400)
src/core/ngx_conf_file.c
src/http/ngx_http_script.c

index 6cfb5d58db3dc3996d25b0472758f1fbf0a56ffd..f61bfcabf99fa88f28a020b5f633cf9c451ad57f 100644 (file)
@@ -800,10 +800,11 @@ ngx_conf_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 ngx_int_t
 ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name, ngx_uint_t conf_prefix)
 {
-    return ngx_get_full_name(cycle->pool,
-                             conf_prefix ? &cycle->conf_prefix:
-                                           &cycle->prefix,
-                             name);
+    ngx_str_t  *prefix;
+
+    prefix = conf_prefix ? &cycle->conf_prefix : &cycle->prefix;
+
+    return ngx_get_full_name(cycle->pool, prefix, name);
 }
 
 
index 1da793b8f08659af4b0658c44e386dcd14964a42..5fc4cfca0fb60b7aecd0bbbff1ad8b00595a53da 100644 (file)
@@ -1327,20 +1327,17 @@ ngx_http_script_full_name_code(ngx_http_script_engine_t *e)
 {
     ngx_http_script_full_name_code_t  *code;
 
-    ngx_str_t  value;
+    ngx_str_t  value, *prefix;
 
     code = (ngx_http_script_full_name_code_t *) e->ip;
 
     value.data = e->buf.data;
     value.len = e->pos - e->buf.data;
 
-    if (ngx_get_full_name(e->request->pool,
-                          code->conf_prefix
-                                       ? (ngx_str_t *) &ngx_cycle->conf_prefix:
-                                         (ngx_str_t *) &ngx_cycle->prefix,
-                          &value)
-        != NGX_OK)
-    {
+    prefix = code->conf_prefix ? (ngx_str_t *) &ngx_cycle->conf_prefix:
+                                 (ngx_str_t *) &ngx_cycle->prefix;
+
+    if (ngx_get_full_name(e->request->pool, prefix, &value) != NGX_OK) {
         e->ip = ngx_http_script_exit;
         e->status = NGX_HTTP_INTERNAL_SERVER_ERROR;
         return;