From 97d3096040f5ee52d69492f675bcd06ce8aa9e3e Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 6 Nov 2024 10:06:50 +0100 Subject: [PATCH] MINOR: http-conv: Remove unreachable goto statement in sample_conv_q_preferred This was reported by Coverity. In sample_conv_q_preferred() function, a goto statement after a "while(1)" loop is unreachable. Instead of just removing it, the same goto statement in the loop is replaced by a break. It is safer this way, in case the loop change in future. This patch should fix the issue #2683. --- src/http_conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_conv.c b/src/http_conv.c index c2a3e281eb..30056036c5 100644 --- a/src/http_conv.c +++ b/src/http_conv.c @@ -157,7 +157,7 @@ static int sample_conv_q_preferred(const struct arg *args, struct sample *smp, v if (http_language_range_match(token, toklen, w, str - w)) goto look_for_q; if (*str == '\0') - goto expect_comma; + break; w = str + 1; } str++;