Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2017-08-09 14:59:46 +0300
committerSergey Kandaurov <pluknet@nginx.com>2017-08-09 14:59:46 +0300
commit32c7bd5102571ec20e45f620d2916e612e3b2016 (patch)
treec037da77eb01716102ee40e80fe28dc92034fe30 /src
parentc7c13a21ada9aa51697a3d24ca2a3bd62db418fc (diff)
Style.
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_conf_file.c1
-rw-r--r--src/event/ngx_event_openssl.c2
-rw-r--r--src/http/modules/ngx_http_geo_module.c1
-rw-r--r--src/os/unix/ngx_files.c1
-rw-r--r--src/os/win32/ngx_files.c1
-rw-r--r--src/stream/ngx_stream_geo_module.c1
6 files changed, 7 insertions, 0 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index ce8c602de..fb28a5a94 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -178,6 +178,7 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
/* open configuration file */
fd = ngx_open_file(filename->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
+
if (fd == NGX_INVALID_FILE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
ngx_open_file_n " \"%s\" failed",
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 07646b6bc..ccd0cd5b8 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -924,6 +924,7 @@ ngx_ssl_read_password_file(ngx_conf_t *cf, ngx_str_t *file)
cln->data = passwords;
fd = ngx_open_file(file->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
+
if (fd == NGX_INVALID_FILE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
ngx_open_file_n " \"%s\" failed", file->data);
@@ -2906,6 +2907,7 @@ ngx_ssl_session_ticket_keys(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_array_t *paths)
file.log = cf->log;
file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY, 0, 0);
+
if (file.fd == NGX_INVALID_FILE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
ngx_open_file_n " \"%V\" failed", &file.name);
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c
index 46a8d7c14..45b1a8e49 100644
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -1401,6 +1401,7 @@ ngx_http_geo_include_binary_base(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
file.log = cf->log;
file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
+
if (file.fd == NGX_INVALID_FILE) {
err = ngx_errno;
if (err != NGX_ENOENT) {
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c
index 7fbb7c9a7..482d32763 100644
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -620,6 +620,7 @@ ngx_create_file_mapping(ngx_file_mapping_t *fm)
{
fm->fd = ngx_open_file(fm->name, NGX_FILE_RDWR, NGX_FILE_TRUNCATE,
NGX_FILE_DEFAULT_ACCESS);
+
if (fm->fd == NGX_INVALID_FILE) {
ngx_log_error(NGX_LOG_CRIT, fm->log, ngx_errno,
ngx_open_file_n " \"%s\" failed", fm->name);
diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c
index 9ef22a56c..55d7f7696 100644
--- a/src/os/win32/ngx_files.c
+++ b/src/os/win32/ngx_files.c
@@ -330,6 +330,7 @@ ngx_create_file_mapping(ngx_file_mapping_t *fm)
fm->fd = ngx_open_file(fm->name, NGX_FILE_RDWR, NGX_FILE_TRUNCATE,
NGX_FILE_DEFAULT_ACCESS);
+
if (fm->fd == NGX_INVALID_FILE) {
ngx_log_error(NGX_LOG_CRIT, fm->log, ngx_errno,
ngx_open_file_n " \"%s\" failed", fm->name);
diff --git a/src/stream/ngx_stream_geo_module.c b/src/stream/ngx_stream_geo_module.c
index 220454631..b34316bdd 100644
--- a/src/stream/ngx_stream_geo_module.c
+++ b/src/stream/ngx_stream_geo_module.c
@@ -1327,6 +1327,7 @@ ngx_stream_geo_include_binary_base(ngx_conf_t *cf,
file.log = cf->log;
file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
+
if (file.fd == NGX_INVALID_FILE) {
err = ngx_errno;
if (err != NGX_ENOENT) {