From 52fd87995361d68336b20ec931472bac2cb706ba Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 17 May 2023 08:43:15 +0200 Subject: [PATCH] CLEANUP: stats: update the trash chunk where it's used When integrating the number of warnings in "show info" in 2.8 with commit 3c4a297d2 ("MINOR: stats: report the total number of warnings issued"), the update of the trash buffer used by the Tainted flag got displaced lower. There's no harm for now util someone adds a new metric requiring a call to chunk_newstr() and gets both values merged. Let's move the call to its location now. --- src/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stats.c b/src/stats.c index c06fce3d30..48eb532e09 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4745,9 +4745,9 @@ int stats_fill_info(struct field *info, int len, uint flags) info[INF_CUM_LOG_MSGS] = mkf_u32(FN_COUNTER, cum_log_messages); info[INF_TAINTED] = mkf_str(FO_STATUS, chunk_newstr(out)); + chunk_appendf(out, "%#x", get_tainted()); info[INF_WARNINGS] = mkf_u32(FN_COUNTER, HA_ATOMIC_LOAD(&tot_warnings)); info[INF_MAXCONN_REACHED] = mkf_u32(FN_COUNTER, HA_ATOMIC_LOAD(&maxconn_reached)); - chunk_appendf(out, "%#x", get_tainted()); return 1; }