CLEANUP: hpack: remove a redundant test in the decoder
authorWilly Tarreau <w@1wt.eu>
Wed, 5 Feb 2020 14:28:55 +0000 (15:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Feb 2020 14:39:08 +0000 (15:39 +0100)
commit077d366ef7d09d2284ddea9f787cfce4ed4d3ba0
treeceeb9e4de54404d8c448bdf4e9d2f32bc4f9e212
parent4dd145a888c7679812664bf2f246fa8199e94ab0
CLEANUP: hpack: remove a redundant test in the decoder

As reported in issue #485 the test for !len at the end of the
loop in get_var_int() is useless since it was already done inside
the loop. Actually the code is more readable if we remove the first
one so let's do this instead. The resulting code is exactly the same
since the compiler already optimized the test away.
src/hpack-dec.c