[nginx] Removed excessive casts for ngx_file_info().

Ruslan Ermilov ru at nginx.com
Wed Jun 14 09:34:07 UTC 2017


details:   http://hg.nginx.org/nginx/rev/d48c8cdac201
branches:  
changeset: 7032:d48c8cdac201
user:      Ruslan Ermilov <ru at nginx.com>
date:      Wed Jun 14 12:29:52 2017 +0300
description:
Removed excessive casts for ngx_file_info().

diffstat:

 src/core/ngx_cycle.c |  4 +---
 src/core/ngx_file.c  |  4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diffs (28 lines):

diff -r b7b7f3a0cc28 -r d48c8cdac201 src/core/ngx_cycle.c
--- a/src/core/ngx_cycle.c	Tue Jun 06 19:37:34 2017 +0300
+++ b/src/core/ngx_cycle.c	Wed Jun 14 12:29:52 2017 +0300
@@ -1124,9 +1124,7 @@ ngx_reopen_files(ngx_cycle_t *cycle, ngx
         if (user != (ngx_uid_t) NGX_CONF_UNSET_UINT) {
             ngx_file_info_t  fi;
 
-            if (ngx_file_info((const char *) file[i].name.data, &fi)
-                == NGX_FILE_ERROR)
-            {
+            if (ngx_file_info(file[i].name.data, &fi) == NGX_FILE_ERROR) {
                 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
                               ngx_file_info_n " \"%s\" failed",
                               file[i].name.data);
diff -r b7b7f3a0cc28 -r d48c8cdac201 src/core/ngx_file.c
--- a/src/core/ngx_file.c	Tue Jun 06 19:37:34 2017 +0300
+++ b/src/core/ngx_file.c	Wed Jun 14 12:29:52 2017 +0300
@@ -622,9 +622,7 @@ ngx_create_paths(ngx_cycle_t *cycle, ngx
         {
         ngx_file_info_t   fi;
 
-        if (ngx_file_info((const char *) path[i]->name.data, &fi)
-            == NGX_FILE_ERROR)
-        {
+        if (ngx_file_info(path[i]->name.data, &fi) == NGX_FILE_ERROR) {
             ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
                           ngx_file_info_n " \"%s\" failed", path[i]->name.data);
             return NGX_ERROR;


More information about the nginx-devel mailing list