BUILD/MINOR: peers: remove an impossible null test in intencode()
authorWilly Tarreau <w@1wt.eu>
Tue, 12 Feb 2019 10:59:35 +0000 (11:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Feb 2019 10:59:35 +0000 (11:59 +0100)
commit9bdd7bc63d94501e649bc0f5c0c3d4a4288004cc
tree80b670bdd166bc8f72f952ff6177d4bb942d9ee7
parent4eee38aa577c37dfd761e2f2d10cfa54fbb6a662
BUILD/MINOR: peers: remove an impossible null test in intencode()

intencode() tests for the nullity of the target pointer passed in
argument, but the code calling intencode() never does so and happily
dereferences it. gcc at -O3 detects this as a potential null deref.
Let's remove this incorrect and misleading test. If this pointer was
null, the code would already crash in the calling functions.

This must be backported to stable versions.
src/peers.c