Inline initial slice buffer allocation
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 4c0394d..110a4b5 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -834,13 +834,10 @@
static int prepare_write(transport *t) {
stream *s;
- gpr_slice_buffer tempbuf;
gpr_uint32 window_delta;
/* simple writes are queued to qbuf, and flushed here */
- tempbuf = t->qbuf;
- t->qbuf = t->outbuf;
- t->outbuf = tempbuf;
+ gpr_slice_buffer_swap(&t->qbuf, &t->outbuf);
GPR_ASSERT(t->qbuf.count == 0);
if (t->dirtied_local_settings && !t->sent_local_settings) {