changeset 2068:75a8d34459c5

ngx_memzero() ngx_open_file_info_t
author Igor Sysoev <igor@sysoev.ru>
date Thu, 26 Jun 2008 14:07:59 +0000
parents 5657037448d1
children 23930ccd2642
files src/http/modules/ngx_http_flv_module.c src/http/modules/ngx_http_gzip_static_module.c src/http/modules/ngx_http_index_module.c src/http/modules/ngx_http_static_module.c src/http/modules/perl/nginx.xs src/http/ngx_http_script.c
diffstat 6 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_flv_module.c	Thu Jun 26 13:00:39 2008 +0000
+++ b/src/http/modules/ngx_http_flv_module.c	Thu Jun 26 14:07:59 2008 +0000
@@ -105,8 +105,8 @@
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
-    of.uniq = 0;
-    of.test_dir = 0;
+    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
     of.valid = clcf->open_file_cache_valid;
     of.min_uses = clcf->open_file_cache_min_uses;
     of.errors = clcf->open_file_cache_errors;
--- a/src/http/modules/ngx_http_gzip_static_module.c	Thu Jun 26 13:00:39 2008 +0000
+++ b/src/http/modules/ngx_http_gzip_static_module.c	Thu Jun 26 14:07:59 2008 +0000
@@ -119,8 +119,8 @@
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
-    of.uniq = 0;
-    of.test_dir = 0;
+    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
     of.valid = clcf->open_file_cache_valid;
     of.min_uses = clcf->open_file_cache_min_uses;
     of.errors = clcf->open_file_cache_errors;
--- a/src/http/modules/ngx_http_index_module.c	Thu Jun 26 13:00:39 2008 +0000
+++ b/src/http/modules/ngx_http_index_module.c	Thu Jun 26 14:07:59 2008 +0000
@@ -208,8 +208,8 @@
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "open index \"%V\"", &path);
 
-        of.uniq = 0;
-        of.test_dir = 0;
+        ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
         of.valid = clcf->open_file_cache_valid;
         of.min_uses = clcf->open_file_cache_min_uses;
         of.errors = clcf->open_file_cache_errors;
@@ -292,10 +292,10 @@
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "http index check dir: \"%V\"", &dir);
 
-    of.uniq = 0;
+    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
     of.test_dir = 1;
     of.valid = clcf->open_file_cache_valid;
-    of.min_uses = 0;
     of.errors = clcf->open_file_cache_errors;
 
     if (ngx_open_cached_file(clcf->open_file_cache, &dir, &of, r->pool)
--- a/src/http/modules/ngx_http_static_module.c	Thu Jun 26 13:00:39 2008 +0000
+++ b/src/http/modules/ngx_http_static_module.c	Thu Jun 26 14:07:59 2008 +0000
@@ -96,8 +96,8 @@
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
-    of.uniq = 0;
-    of.test_dir = 0;
+    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
     of.valid = clcf->open_file_cache_valid;
     of.min_uses = clcf->open_file_cache_min_uses;
     of.errors = clcf->open_file_cache_errors;
--- a/src/http/modules/perl/nginx.xs	Thu Jun 26 13:00:39 2008 +0000
+++ b/src/http/modules/perl/nginx.xs	Thu Jun 26 14:07:59 2008 +0000
@@ -650,8 +650,8 @@
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
-    of.uniq = 0;
-    of.test_dir = 0;
+    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
     of.valid = clcf->open_file_cache_valid;
     of.min_uses = clcf->open_file_cache_min_uses;
     of.errors = clcf->open_file_cache_errors;
--- a/src/http/ngx_http_script.c	Thu Jun 26 13:00:39 2008 +0000
+++ b/src/http/ngx_http_script.c	Thu Jun 26 14:07:59 2008 +0000
@@ -994,8 +994,8 @@
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
-    of.uniq = 0;
-    of.test_dir = 0;
+    ngx_memzero(&of, sizeof(ngx_open_file_info_t));
+
     of.valid = clcf->open_file_cache_valid;
     of.min_uses = clcf->open_file_cache_min_uses;
     of.errors = clcf->open_file_cache_errors;