static bool allocate_iobuf(SBuf *sbuf) { if (sbuf->io == NULL) { sbuf->io = slab_alloc(iobuf_cache); if (sbuf->io == NULL) { sbuf_call_proto(sbuf, SBUF_EV_RECV_FAILED); return false; } iobuf_reset(sbuf->io); } return true; }
static void do_iobuf_reset(void *arg) { IOBuf *io = arg; iobuf_reset(io); }