[nginx] Core: set nginx_shared_zone name via ngx_str_set().

Ruslan Ermilov ru at nginx.com
Tue Mar 28 08:43:46 UTC 2017


details:   http://hg.nginx.org/nginx/rev/a8d7c9139831
branches:  
changeset: 6947:a8d7c9139831
user:      Ruslan Ermilov <ru at nginx.com>
date:      Tue Mar 28 11:28:51 2017 +0300
description:
Core: set nginx_shared_zone name via ngx_str_set().

diffstat:

 src/event/ngx_event.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (13 lines):

diff -r 99c87770b81b -r a8d7c9139831 src/event/ngx_event.c
--- a/src/event/ngx_event.c	Tue Mar 28 11:28:42 2017 +0300
+++ b/src/event/ngx_event.c	Tue Mar 28 11:28:51 2017 +0300
@@ -500,8 +500,7 @@ ngx_event_module_init(ngx_cycle_t *cycle
 #endif
 
     shm.size = size;
-    shm.name.len = sizeof("nginx_shared_zone") - 1;
-    shm.name.data = (u_char *) "nginx_shared_zone";
+    ngx_str_set(&shm.name, "nginx_shared_zone");
     shm.log = cycle->log;
 
     if (ngx_shm_alloc(&shm) != NGX_OK) {


More information about the nginx-devel mailing list