mirror of
https://github.com/nginx/nginx.git
synced 2025-06-06 17:02:39 +08:00
Style.
This commit is contained in:
parent
c7c13a21ad
commit
32c7bd5102
@ -178,6 +178,7 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
|
|||||||
/* open configuration file */
|
/* open configuration file */
|
||||||
|
|
||||||
fd = ngx_open_file(filename->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
|
fd = ngx_open_file(filename->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
|
||||||
|
|
||||||
if (fd == NGX_INVALID_FILE) {
|
if (fd == NGX_INVALID_FILE) {
|
||||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
|
||||||
ngx_open_file_n " \"%s\" failed",
|
ngx_open_file_n " \"%s\" failed",
|
||||||
|
@ -924,6 +924,7 @@ ngx_ssl_read_password_file(ngx_conf_t *cf, ngx_str_t *file)
|
|||||||
cln->data = passwords;
|
cln->data = passwords;
|
||||||
|
|
||||||
fd = ngx_open_file(file->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
|
fd = ngx_open_file(file->data, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
|
||||||
|
|
||||||
if (fd == NGX_INVALID_FILE) {
|
if (fd == NGX_INVALID_FILE) {
|
||||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
|
||||||
ngx_open_file_n " \"%s\" failed", file->data);
|
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.log = cf->log;
|
||||||
|
|
||||||
file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY, 0, 0);
|
file.fd = ngx_open_file(file.name.data, NGX_FILE_RDONLY, 0, 0);
|
||||||
|
|
||||||
if (file.fd == NGX_INVALID_FILE) {
|
if (file.fd == NGX_INVALID_FILE) {
|
||||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno,
|
||||||
ngx_open_file_n " \"%V\" failed", &file.name);
|
ngx_open_file_n " \"%V\" failed", &file.name);
|
||||||
|
@ -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.log = cf->log;
|
||||||
|
|
||||||
file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
|
file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
|
||||||
|
|
||||||
if (file.fd == NGX_INVALID_FILE) {
|
if (file.fd == NGX_INVALID_FILE) {
|
||||||
err = ngx_errno;
|
err = ngx_errno;
|
||||||
if (err != NGX_ENOENT) {
|
if (err != NGX_ENOENT) {
|
||||||
|
@ -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,
|
fm->fd = ngx_open_file(fm->name, NGX_FILE_RDWR, NGX_FILE_TRUNCATE,
|
||||||
NGX_FILE_DEFAULT_ACCESS);
|
NGX_FILE_DEFAULT_ACCESS);
|
||||||
|
|
||||||
if (fm->fd == NGX_INVALID_FILE) {
|
if (fm->fd == NGX_INVALID_FILE) {
|
||||||
ngx_log_error(NGX_LOG_CRIT, fm->log, ngx_errno,
|
ngx_log_error(NGX_LOG_CRIT, fm->log, ngx_errno,
|
||||||
ngx_open_file_n " \"%s\" failed", fm->name);
|
ngx_open_file_n " \"%s\" failed", fm->name);
|
||||||
|
@ -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,
|
fm->fd = ngx_open_file(fm->name, NGX_FILE_RDWR, NGX_FILE_TRUNCATE,
|
||||||
NGX_FILE_DEFAULT_ACCESS);
|
NGX_FILE_DEFAULT_ACCESS);
|
||||||
|
|
||||||
if (fm->fd == NGX_INVALID_FILE) {
|
if (fm->fd == NGX_INVALID_FILE) {
|
||||||
ngx_log_error(NGX_LOG_CRIT, fm->log, ngx_errno,
|
ngx_log_error(NGX_LOG_CRIT, fm->log, ngx_errno,
|
||||||
ngx_open_file_n " \"%s\" failed", fm->name);
|
ngx_open_file_n " \"%s\" failed", fm->name);
|
||||||
|
@ -1327,6 +1327,7 @@ ngx_stream_geo_include_binary_base(ngx_conf_t *cf,
|
|||||||
file.log = cf->log;
|
file.log = cf->log;
|
||||||
|
|
||||||
file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
|
file.fd = ngx_open_file(name->data, NGX_FILE_RDONLY, 0, 0);
|
||||||
|
|
||||||
if (file.fd == NGX_INVALID_FILE) {
|
if (file.fd == NGX_INVALID_FILE) {
|
||||||
err = ngx_errno;
|
err = ngx_errno;
|
||||||
if (err != NGX_ENOENT) {
|
if (err != NGX_ENOENT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user