This is an automated email from Gerrit. "Antonio Borneo <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9317
-- gerrit commit 284ab75e7af9c940c49b00eab03682c71a4d197c Author: Antonio Borneo <[email protected]> Date: Sun Nov 2 16:51:36 2025 +0100 helper: log: document the last user of hack in alloc_vprintf() Apparently the last user of the hack in alloc_vprintf() is the code in log_vprintf_lf(). Document it for future rework. Change-Id: I6b69f8b7f3feb93e5daa9649c4122ec12e22d84f Signed-off-by: Antonio Borneo <[email protected]> diff --git a/src/helper/log.c b/src/helper/log.c index 7acb154c62..eec0c04dd1 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -364,7 +364,8 @@ char *alloc_vprintf(const char *fmt, va_list ap) /* allocate and make room for terminating zero. */ /* FIXME: The old version always allocated at least one byte extra and * other code depend on that. They should be probably be fixed, but for - * now reserve the extra byte. */ + * now reserve the extra byte. Apparently the last user of such hack is + * log_vprintf_lf() that adds a trailing newline. */ string = malloc(len + 2); if (!string) return NULL; --
