This is an automated email from Gerrit. "R. Diez <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9318
-- gerrit commit f5a507d6225bb1ae13ad49ba55ff7a4af1c9eaaa Author: R. Diez <[email protected]> Date: Mon Dec 15 19:07:41 2025 +0100 log: avoid incrementing 'count' for discarded log lines This matches the behaviour of code which calls LOG_DEBUG_IO etc. instead. Change-Id: I7679f0fc67222f947a4d0f1d53aa627a186ebcd3 Signed-off-by: R. Diez <[email protected]> diff --git a/src/helper/log.c b/src/helper/log.c index 7acb154c62..9dcdcb1614 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -152,10 +152,11 @@ void log_printf(enum log_levels level, char *string; va_list ap; - count++; if (level > debug_level) return; + count++; + va_start(ap, format); string = alloc_vprintf(format, ap); @@ -172,11 +173,11 @@ void log_vprintf_lf(enum log_levels level, const char *file, unsigned int line, { char *tmp; - count++; - if (level > debug_level) return; + count++; + tmp = alloc_vprintf(format, args); if (!tmp) --
