projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea5f49b
)
Fix available byte count returned by ioq_grow().
author
Michael Poole
<mdpoole@troilus.org>
Fri, 19 Nov 2010 21:02:01 +0000
(16:02 -0500)
committer
Michael Poole
<mdpoole@troilus.org>
Fri, 19 Nov 2010 21:02:01 +0000
(16:02 -0500)
ioq_grow() needs to use the same -1 that ioq_put_avail() uses when
the "get" pointer is at byte 0.
src/ioset.c (ioq_grow): Reduce the reported available-byte count by 1.
src/ioset.c
patch
|
blob
|
history
diff --git
a/src/ioset.c
b/src/ioset.c
index a7563d30398e90aca346eddc6b21b3e92a66a293..04cae40524e53a4f423b7d56cb117fcfcf25dccb 100644
(file)
--- a/
src/ioset.c
+++ b/
src/ioset.c
@@
-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;