]> git.kaiwu.me - nginx.git/commitdiff
optimization
authorIgor Sysoev <igor@sysoev.ru>
Thu, 27 Dec 2007 09:17:20 +0000 (09:17 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 27 Dec 2007 09:17:20 +0000 (09:17 +0000)
src/http/ngx_http_core_module.c

index bd906f20e4571ebe07027a8740dd394386322790..c2a8457a78f3666a8b279bb832d4f23e894edf55 100644 (file)
@@ -2891,8 +2891,7 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         sn->regex = NULL;
 #endif
         sn->core_srv_conf = cscf;
-        sn->name.len = value[i].len;
-        sn->name.data = value[i].data;
+        sn->name = value[i];
 
         if (value[i].data[0] != '~') {
             continue;
@@ -2917,8 +2916,7 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             return NGX_CONF_ERROR;
         }
 
-        sn->name.len = value[i].len;
-        sn->name.data = value[i].data;
+        sn->name = value[i];
         }
 #else
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,