MINOR: h2: use b_slow_realign() with the trash as a swap buffer
H2 doesn't use the trash so it can make use of it as a swap area when
calling b_slow_realign(). This way we don't need buffer_slow_realign()
anymore.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 3210302..9a1d718 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -2688,7 +2688,7 @@
/* it doesn't fit and the buffer is fragmented,
* so let's defragment it and try again.
*/
- buffer_slow_realign(buf, 0);
+ b_slow_realign(buf, trash.str, 0);
}
/* first check if we have some room after p+i */
@@ -2995,7 +2995,7 @@
if (outbuf.size >= 9 || !buffer_space_wraps(h2c->mbuf))
break;
realign_again:
- buffer_slow_realign(h2c->mbuf, h2c->mbuf->o);
+ b_slow_realign(h2c->mbuf, trash.str, h2c->mbuf->o);
}
if (outbuf.size < 9) {
@@ -3153,7 +3153,7 @@
if (outbuf.size >= 9 || !buffer_space_wraps(h2c->mbuf))
break;
realign_again:
- buffer_slow_realign(h2c->mbuf, h2c->mbuf->o);
+ b_slow_realign(h2c->mbuf, trash.str, h2c->mbuf->o);
}
if (outbuf.size < 9) {