Skip to content

Commit

Permalink
Removed excessive casts for ngx_file_info().
Browse files Browse the repository at this point in the history
  • Loading branch information
mdocguard committed Jun 14, 2017
1 parent 90727eb commit 731d1fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/core/ngx_cycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,9 +1124,7 @@ ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
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);
Expand Down
4 changes: 1 addition & 3 deletions src/core/ngx_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,7 @@ ngx_create_paths(ngx_cycle_t *cycle, ngx_uid_t user)
{
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;
Expand Down

0 comments on commit 731d1fe

Please sign in to comment.