]> git.kaiwu.me - nginx.git/commitdiff
Unified handling of ngx_create_temp_file() return value.
authorValentin Bartenev <vbart@nginx.com>
Fri, 26 Dec 2014 13:22:50 +0000 (16:22 +0300)
committerValentin Bartenev <vbart@nginx.com>
Fri, 26 Dec 2014 13:22:50 +0000 (16:22 +0300)
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.

src/core/ngx_file.c

index 7e6e921a39b577b62a88c08e0e0d6d468a13217f..1cafb825df3cbf4df2715fd3589dd965057cc30a 100644 (file)
@@ -114,7 +114,7 @@ ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain)
         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;
         }