MEDIUM: mux: make mux->rcv_buf() take a size_t for the count
It also returns a size_t. This is in order to clean the API. Note
that the H2 mux still uses some ints in the functions called from
h2_rcv_buf(), though it's not really a problem given that H2 frames
are smaller. It may deserve a general cleanup later though.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 4a39b51..2895839 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -2920,11 +2920,11 @@
* caller is responsible for never asking for more data than what is available
* in the buffer.
*/
-static int h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, int count)
+static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t count)
{
struct h2s *h2s = cs->ctx;
struct h2c *h2c = h2s->h2c;
- int ret = 0;
+ size_t ret = 0;
if (h2c->st0 != H2_CS_FRAME_P)
return 0; // no pre-parsed frame yet