Skip to content

Commit 97d3096

Browse files
committed
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.
1 parent 1cc9340 commit 97d3096

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http_conv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int sample_conv_q_preferred(const struct arg *args, struct sample *smp, v
157157
if (http_language_range_match(token, toklen, w, str - w))
158158
goto look_for_q;
159159
if (*str == '\0')
160-
goto expect_comma;
160+
break;
161161
w = str + 1;
162162
}
163163
str++;

0 commit comments

Comments
 (0)