diff src/core/ngx_output_chain.c @ 3515:76d252724db5

use ngx_min() and ngx_max()
author Igor Sysoev <igor@sysoev.ru>
date Fri, 14 May 2010 09:55:33 +0000
parents b1b1775698d5
children 7450029ff51e
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -465,10 +465,7 @@ ngx_output_chain_copy_buf(ngx_output_cha
     dst = ctx->buf;
 
     size = ngx_buf_size(src);
-
-    if (size > dst->end - dst->pos) {
-        size = dst->end - dst->pos;
-    }
+    size = ngx_min(size, dst->end - dst->pos);
 
     sendfile = ctx->sendfile & !ctx->directio;