BUILD: listener: shut report of possible null-deref in listener_accept()

When building without threads, gcc 12 says that there's a null-deref in
_HA_ATOMIC_INC() called from listener_accept(). It's just that the code
was originally written in an attempt not to always have a proxy for a
listener and that there are two places where the pointer is tested before
being used, so the compiler concludes that the pointer might be null
hence that other places are null-derefs.

In practice the pointer cannot be null there (and never has been), but
since that code was initially built that way and it's only a matter of
adding a pair of braces to shut it up, let's respect that initial
attempt in case one day we need it.

This one was also reported by Ilya in issue #1513, though with threads
enabled in his case.

This may have to be backported if users complain about new breakage with
gcc-12.

(cherry picked from commit d86793479fbd21a976d5baa0bbc383c65cfac490)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 5c61c6bdce47e41f248ee90961d9aa66a1bb6d95)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed