}
-int wire_buf_init(struct wire_buf *wb, size_t initial_size)
+void wire_buf_init(struct wire_buf *wb, size_t initial_size)
{
char *buf = malloc(initial_size);
kr_require(buf);
.buf = buf,
.size = initial_size
};
-
- return kr_ok();
}
void wire_buf_deinit(struct wire_buf *wb)
memcpy(&s->layer_data, offsets, sizeof(offsets));
queue_init(s->waiting);
- int ret = wire_buf_init(&s->wire_buf, wire_buf_length);
- kr_require(!ret);
+ wire_buf_init(&s->wire_buf, wire_buf_length);
- ret = uv_timer_init(uv_default_loop(), &s->timer);
+ int ret = uv_timer_init(uv_default_loop(), &s->timer);
kr_require(!ret);
s->timer.data = s;
session2_inc_refs(s); /* Session owns the timer */
/** Initializes the wire buffer with the specified `initial_size` and allocates
* the underlying memory. */
-int wire_buf_init(struct wire_buf *wb, size_t initial_size);
+void wire_buf_init(struct wire_buf *wb, size_t initial_size);
/** De-allocates the wire buffer's underlying memory (the struct itself is left
* intact). */