From 05b1a8f1e3595beab4397e25c2a6db9d832a6a97 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 14 May 2010 09:56:37 +0000 Subject: ngx_str_set() and ngx_str_null() --- src/mail/ngx_mail_auth_http_module.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mail/ngx_mail_auth_http_module.c') diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c index b9f963578..d54a392ac 100644 --- a/src/mail/ngx_mail_auth_http_module.c +++ b/src/mail/ngx_mail_auth_http_module.c @@ -1409,15 +1409,13 @@ ngx_mail_auth_http(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ahcf->host_header = u.host; } else { - ahcf->host_header.len = sizeof("localhost") - 1; - ahcf->host_header.data = (u_char *) "localhost"; + ngx_str_set(&ahcf->host_header, "localhost"); } ahcf->uri = u.uri; if (ahcf->uri.len == 0) { - ahcf->uri.len = sizeof("/") - 1; - ahcf->uri.data = (u_char *) "/"; + ngx_str_set(&ahcf->uri, "/"); } return NGX_CONF_OK; -- cgit