]> git.kaiwu.me - nginx.git/commit
Use NGX_FILE_ERROR for handling file operations errors.
authorValentin Bartenev <vbart@nginx.com>
Mon, 25 Mar 2013 15:49:11 +0000 (15:49 +0000)
committerValentin Bartenev <vbart@nginx.com>
Mon, 25 Mar 2013 15:49:11 +0000 (15:49 +0000)
commit604e18fb2c97b86b49b93b969d55003c9656f143
treea93a3ba36cf535d7aed22f8d647e1a2e79a7fde5
parentea327f13f130be87cf3023e215d1c97b5465343f
Use NGX_FILE_ERROR for handling file operations errors.

On Win32 platforms 0 is used to indicate errors in file operations, so
comparing against -1 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.
src/core/nginx.c
src/core/ngx_conf_file.c
src/core/ngx_connection.c
src/core/ngx_cycle.c
src/os/unix/ngx_process_cycle.c