MINOR: errors: use ring_dup() to duplicate the startup_logs

In startup_logs_dup() we currently need to reference the ring's buffer,
better not do this as it will complicate operations when switching to
other types.
This commit is contained in:
Willy Tarreau 2024-02-27 19:52:50 +01:00
parent 7c9ce715c9
commit a75052d665

View File

@ -210,8 +210,7 @@ struct ring *startup_logs_dup(struct ring *src)
if (!dst)
goto error;
b_reset(&dst->buf);
b_ncat(&dst->buf, &src->buf, ring_data(src));
ring_dup(dst, src, ring_size(src));
error:
return dst;
}