[PATCH 3 of 3] Style: use ngx_str_set()
Maxim Dounin
mdounin at mdounin.ru
Wed Jul 9 15:31:09 UTC 2014
Hello!
On Wed, Jul 09, 2014 at 11:31:10PM +0900, cubicdaiya at gmail.com wrote:
> # HG changeset patch
> # User Tatsuhiko Kubo <cubicdaiya at gmail.com>
> # Date 1404915839 -32400
> # Wed Jul 09 23:23:59 2014 +0900
> # Node ID d80543940f9a33b262d05864a30ab8b22e906455
> # Parent f166c521b619dab231b15e60cec47dd81f52833e
> Style: use ngx_str_set().
>
> diff -r f166c521b619 -r d80543940f9a src/http/modules/ngx_http_memcached_module.c
> --- a/src/http/modules/ngx_http_memcached_module.c Wed Jul 09 23:22:14 2014 +0900
> +++ b/src/http/modules/ngx_http_memcached_module.c Wed Jul 09 23:23:59 2014 +0900
> @@ -380,11 +380,8 @@
> }
>
> h->hash = 1;
> - h->key.len = sizeof("Content-Encoding") - 1;
> - h->key.data = (u_char *) "Content-Encoding";
> - h->value.len = sizeof("gzip") - 1;
> - h->value.data = (u_char *) "gzip";
> -
> + ngx_str_set(&h->key, "Content-Encoding");
> + ngx_str_set(&h->value, "gzip");
> r->headers_out.content_encoding = h;
> }
All patches committed, thanks.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list