Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix off-by-one error in comparison
Browse files Browse the repository at this point in the history
Only 3 of the 4 buffer list entries were being used.
  • Loading branch information
bnoordhuis committed Sep 14, 2011
1 parent 3c96410 commit 4b9b692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix/stream.c
Expand Up @@ -685,7 +685,7 @@ int uv_write(uv_write_t* req, uv_stream_t* stream, uv_buf_t bufs[], int bufcnt,
req->type = UV_WRITE;
ngx_queue_init(&req->queue);

if (bufcnt < UV_REQ_BUFSML_SIZE) {
if (bufcnt <= UV_REQ_BUFSML_SIZE) {
req->bufs = req->bufsml;
}
else {
Expand Down

0 comments on commit 4b9b692

Please sign in to comment.