diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2013-03-29 18:18:42 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-03-29 18:18:42 +0000 |
| commit | e693243a9f0382486b74fe9ca4248f9e4eca507e (patch) | |
| tree | 452759c29f59fff4c2202acd7d6791a1f768d644 /src/core/ngx_cycle.c | |
| parent | 4e2bbc23c1564ac1458dc17c5c6c38ca52ae012d (diff) | |
| download | nginx-e693243a9f0382486b74fe9ca4248f9e4eca507e.tar.gz nginx-e693243a9f0382486b74fe9ca4248f9e4eca507e.tar.bz2 | |
Merge of r5138: use of NGX_FILE_ERROR.
Use NGX_FILE_ERROR for handling file operations errors.
On Win32 platforms 0 is used to indicate errors in file operations, so
comparing against either -1 or NGX_OK is not portable.
This was not much of an issue in patched code, since only ngx_fd_info() test
is actually reachable on Win32 and in worst case it might result in bogus
error log entry.
Patch by Piotr Sikora.
Diffstat (limited to 'src/core/ngx_cycle.c')
| -rw-r--r-- | src/core/ngx_cycle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index dc4dc8993..87b6d7daa 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -679,7 +679,7 @@ old_shm_zone_done: ngx_log_error(NGX_LOG_WARN, cycle->log, 0, "deleting socket %s", name); - if (ngx_delete_file(name) == -1) { + if (ngx_delete_file(name) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno, ngx_delete_file_n " %s failed", name); } |
