unix: fix off-by-one error in comparison

Only 3 of the 4 buffer list entries were being used.
This commit is contained in:
Ben Noordhuis 2011-09-14 04:29:01 +02:00
parent 3c96410902
commit 4b9b692bb7

View File

@ -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 {