changeset 3080:af427e13cfd7

small optimization
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Sep 2009 09:50:58 +0000
parents 566eeb81e807
children 10bfdd8d5eb9
files src/os/unix/ngx_freebsd_sendfile_chain.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -295,14 +295,13 @@ ngx_freebsd_sendfile_chain(ngx_connectio
 
                 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, err,
                                "sendfile() sent only %O bytes", sent);
-            }
 
             /*
              * sendfile() in FreeBSD 3.x-4.x may return value >= 0
              * on success, although only 0 is documented
              */
 
-            if (rc >= 0 && sent == 0) {
+            } else if (rc >= 0 && sent == 0) {
 
                 /*
                  * if rc is OK and sent equal to zero, then someone