From 0c42c79edfb031509c9c0cf833d52a6f4c064356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Thu, 4 Jan 2024 09:16:37 -0800 Subject: [PATCH] utils/u_debug: Fix parse of "all, MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If debug string is something like "all,file=..." the all case would never be executed, this can be fixed by comparing up to strlen("all"). Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: --- src/util/u_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/u_debug.c b/src/util/u_debug.c index 61f628e284b..a86b37a67e9 100644 --- a/src/util/u_debug.c +++ b/src/util/u_debug.c @@ -423,7 +423,7 @@ parse_debug_string(const char *debug, if (debug != NULL) { for (; control->string != NULL; control++) { - if (!strcmp(debug, "all")) { + if (!strncmp(debug, "all", strlen("all"))) { flag |= control->flag; } else {