[nginx] Unified handling of ngx_create_temp_file() return value.

Valentin Bartenev vbart at nginx.com
Fri Dec 26 13:23:53 UTC 2014


details:   http://hg.nginx.org/nginx/rev/570677a06dce
branches:  
changeset: 5957:570677a06dce
user:      Valentin Bartenev <vbart at nginx.com>
date:      Fri Dec 26 16:22:50 2014 +0300
description:
Unified handling of ngx_create_temp_file() return value.

The original check for NGX_AGAIN was surplus, since the function returns
only NGX_OK or NGX_ERROR.  Now it looks similar to other places.

No functional changes.

diffstat:

 src/core/ngx_file.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 4045818c726a -r 570677a06dce src/core/ngx_file.c
--- a/src/core/ngx_file.c	Wed Dec 24 19:02:58 2014 +0300
+++ b/src/core/ngx_file.c	Fri Dec 26 16:22:50 2014 +0300
@@ -114,7 +114,7 @@ ngx_write_chain_to_temp_file(ngx_temp_fi
         rc = ngx_create_temp_file(&tf->file, tf->path, tf->pool,
                                   tf->persistent, tf->clean, tf->access);
 
-        if (rc == NGX_ERROR || rc == NGX_AGAIN) {
+        if (rc != NGX_OK) {
             return rc;
         }
 



More information about the nginx-devel mailing list