summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_cycle.c4
-rw-r--r--src/core/ngx_file.c4
-rw-r--r--src/core/ngx_open_file_cache.c6
3 files changed, 9 insertions, 5 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 10d07714b..15f8e8d24 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -1126,7 +1126,9 @@ 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) == -1) {
+ if (ngx_file_info((const char *) 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 --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index 6bff833d6..450da5623 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -489,7 +489,9 @@ ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user)
{
ngx_file_info_t fi;
- if (ngx_file_info((const char *) path[i]->name.data, &fi) == -1) {
+ if (ngx_file_info((const char *) 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;
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index 6deb0ce0b..e0b434b13 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -143,7 +143,7 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name,
if (of->test_only) {
- if (ngx_file_info(name->data, &fi) == -1) {
+ if (ngx_file_info(name->data, &fi) == NGX_FILE_ERROR) {
of->err = ngx_errno;
of->failed = ngx_file_info_n;
return NGX_ERROR;
@@ -463,7 +463,7 @@ ngx_open_and_stat_file(u_char *name, ngx_open_file_info_t *of, ngx_log_t *log)
if (of->fd != NGX_INVALID_FILE) {
- if (ngx_file_info(name, &fi) == -1) {
+ if (ngx_file_info(name, &fi) == NGX_FILE_ERROR) {
of->failed = ngx_file_info_n;
goto failed;
}
@@ -474,7 +474,7 @@ ngx_open_and_stat_file(u_char *name, ngx_open_file_info_t *of, ngx_log_t *log)
} else if (of->test_dir) {
- if (ngx_file_info(name, &fi) == -1) {
+ if (ngx_file_info(name, &fi) == NGX_FILE_ERROR) {
of->failed = ngx_file_info_n;
goto failed;
}