diff src/http/modules/ngx_http_log_module.c @ 3516:dd1570b6f237

ngx_str_set() and ngx_str_null()
author Igor Sysoev <igor@sysoev.ru>
date Fri, 14 May 2010 09:56:37 +0000
parents 76d252724db5
children eae4a59ae59a
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -747,8 +747,7 @@ ngx_http_log_create_main_conf(ngx_conf_t
         return NULL;
     }
 
-    fmt->name.len = sizeof("combined") - 1;
-    fmt->name.data = (u_char *) "combined";
+    ngx_str_set(&fmt->name, "combined");
 
     fmt->flushes = NULL;
 
@@ -922,8 +921,7 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
         }
 
     } else {
-        name.len = sizeof("combined") - 1;
-        name.data = (u_char *) "combined";
+        ngx_str_set(&name, "combined");
         lmcf->combined_used = 1;
     }