From: Willy Tarreau Date: Tue, 27 Feb 2024 18:52:50 +0000 (+0100) Subject: MINOR: errors: use ring_dup() to duplicate the startup_logs X-Git-Tag: v3.0-dev6~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a75052d665e42707ff8d7b8fd17e064cf304fcf6;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/errors.c b/src/errors.c index c851de31e1..5aeb6a4c28 100644 --- a/src/errors.c +++ b/src/errors.c @@ -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; }