From a75052d665e42707ff8d7b8fd17e064cf304fcf6 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 27 Feb 2024 19:52:50 +0100 Subject: [PATCH] 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. --- src/errors.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.47.3