]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: htx: never check for null htx pointer in htx_is_{,not_}empty()
authorWilly Tarreau <w@1wt.eu>
Thu, 31 Jan 2019 06:31:18 +0000 (07:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 31 Jan 2019 07:07:17 +0000 (08:07 +0100)
commite5fcfbed5cbeba61a7de8cbe36f68f0138b95062
tree4ea810932e83d3478b6040559440e95808bb6eaa
parent245d189cce724967d4709ab41365d909870be829
MINOR: htx: never check for null htx pointer in htx_is_{,not_}empty()

The previous patch clarifies the fact that the htx pointer is never null
along all the code. This test for a null will never match, didn't catch
the pointer 1 before the fix for b_is_null(), but it confuses the compiler
letting it think that any dereferences made to this pointer after this
test could actually mean we're dereferencing a null. Let's now drop this
test. This saves us from having to add impossible tests everywhere to
avoid the warning.

This should be backported to 1.9 if the b_is_null() patch is backported.
include/common/htx.h