We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae46e88 commit 2d231f4Copy full SHA for 2d231f4
src/lib/lwan-request.c
@@ -293,14 +293,11 @@ static char *find_pct_or_plus(const char *input)
293
uint64_t m = LWAN_MAX(has_plus, has_pct);
294
295
if (has_zero && LWAN_MAX(has_zero, m) == has_zero) {
296
- switch (__builtin_ctzll(has_zero) / 8) {
297
- case 1 ... 3:
+ const int zero_pos = __builtin_ctzll(has_zero) / 8;
+ if (zero_pos >= 1 && zero_pos <= 3)
298
goto check_small;
299
- case 4 ... 7:
+ if (zero_pos >= 4 && zero_pos <= 7)
300
goto check_at_least_four;
301
- default:
302
- return NULL;
303
- }
304
}
305
306
if (m) {
0 commit comments