aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_output_chain.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-05-14 09:55:33 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-05-14 09:55:33 +0000
commit328df7a5cc91180fef3b1b58129e14bc79bef80b (patch)
tree1c5d8228b26c522371e2edc164f7d9104401f463 /src/core/ngx_output_chain.c
parent5739072cfe7ecd27a1f4f70f68b508f54d9d3a75 (diff)
downloadnginx-328df7a5cc91180fef3b1b58129e14bc79bef80b.tar.gz
nginx-328df7a5cc91180fef3b1b58129e14bc79bef80b.zip
use ngx_min() and ngx_max()
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r--src/core/ngx_output_chain.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 3ff25ff76..f51d69000 100644
--- 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_chain_ctx_t *ctx)
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;