diff options
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r-- | src/core/ngx_output_chain.c | 5 |
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; |