From 18dd26fcdaa879bb07f6bbd10c7a4bdda9081d18 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 11 Aug 2026 11:13:14 +0200 Subject: [PATCH] MINOR: debug: prepare complain() to be used in multiple ways We'll intrument the function to do a bit more, but all call paths will not be able to support this, so let's first turn it to a general one as _complain() and have complain() just call it. Better not inline them, we don't want to duplicate the footprint for something rarely used. --- src/debug.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index f49c94e00..56da25d29 100644 --- a/src/debug.c +++ b/src/debug.c @@ -973,7 +973,7 @@ void ha_stuck_warning(void) * follows is a new line that will be appended after another LF (normally it's * used to give extra info to the user about the issue's location). */ -void complain(uint details, const char *msg) +static void _complain(uint details, const char *msg) { struct iovec iovec[10]; const char *pfx; @@ -1056,6 +1056,12 @@ void complain(uint details, const char *msg) mark_tainted(TAINTED_WARN); } +/* the exported function */ +void complain(uint details, const char *msg) +{ + _complain(details, msg); +} + /* parse a "debug dev exit" command. It always returns 1, though it should never return. */ static int debug_parse_cli_exit(char **args, char *payload, struct appctx *appctx, void *private) { -- 2.47.3