Fix available byte count returned by ioq_grow().
[srvx.git] / src / ioset.c
index a7563d30398e90aca346eddc6b21b3e92a66a293..04cae40524e53a4f423b7d56cb117fcfcf25dccb 100644 (file)
@@ -131,7 +131,7 @@ ioq_grow(struct ioq *ioq) {
     ioq->get = 0;
     ioq->buf = new_buf;
     ioq->size = new_size;
-    return new_size - ioq->put;
+    return new_size - ioq->put - 1;
 }
 
 extern struct io_engine io_engine_kevent;