[nginx] Core: removed excessive initialization in ngx_conf_set_p...

Sergey Kandaurov pluknet at nginx.com
Mon Apr 6 22:33:46 UTC 2015


details:   http://hg.nginx.org/nginx/rev/3f5465a33fa8
branches:  
changeset: 6070:3f5465a33fa8
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Tue Apr 07 01:32:07 2015 +0300
description:
Core: removed excessive initialization in ngx_conf_set_path_slot().

Level hierarchy is pre-zeroed in ngx_pcalloc() of the surrounding ngx_path_t.

diffstat:

 src/core/ngx_file.c |  4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diffs (14 lines):

diff -r e37ec0a33901 -r 3f5465a33fa8 src/core/ngx_file.c
--- a/src/core/ngx_file.c	Tue Apr 07 01:32:05 2015 +0300
+++ b/src/core/ngx_file.c	Tue Apr 07 01:32:07 2015 +0300
@@ -372,10 +372,6 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, n
         path->len += level + 1;
     }
 
-    while (i < 3) {
-        path->level[i++] = 0;
-    }
-
     *slot = path;
 
     if (ngx_add_path(cf, slot) == NGX_ERROR) {



More information about the nginx-devel mailing list