As we're going to remove the ring's buffer, we don't want callers to access
it directly, so let's use ring_data() and ring_size() instead for this.
struct ring *dst = NULL;
/* must use the size of the previous buffer */
- dst = ring_new(b_size(&src->buf));
+ dst = ring_new(ring_size(src));
if (!dst)
goto error;
b_reset(&dst->buf);
- b_ncat(&dst->buf, &src->buf, b_data(&src->buf));
+ b_ncat(&dst->buf, &src->buf, ring_data(src));
error:
return dst;
}
chunk_printf(&trash, "Success=1\n");
}
#ifdef USE_SHM_OPEN
- if (startup_logs && b_data(&startup_logs->buf) > 1)
+ if (startup_logs && ring_data(startup_logs) > 1)
chunk_appendf(&trash, "--\n");
if (applet_putchk(appctx, &trash) == -1)