]> git.kaiwu.me - nginx.git/commitdiff
Core: removed excessive initialization in ngx_conf_set_path_slot().
authorSergey Kandaurov <pluknet@nginx.com>
Mon, 6 Apr 2015 22:32:07 +0000 (01:32 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Mon, 6 Apr 2015 22:32:07 +0000 (01:32 +0300)
Level hierarchy is pre-zeroed in ngx_pcalloc() of the surrounding ngx_path_t.

src/core/ngx_file.c

index ad2b3c953fa65d2fcba280ad5f1a5136ec6941e8..a8b07ecea98d7c454bd14af8f7266f29bdff2535 100644 (file)
@@ -372,10 +372,6 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         path->len += level + 1;
     }
 
-    while (i < 3) {
-        path->level[i++] = 0;
-    }
-
     *slot = path;
 
     if (ngx_add_path(cf, slot) == NGX_ERROR) {