]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: conn_stream: avoid null-deref warnings on gcc 6
authorWilly Tarreau <w@1wt.eu>
Wed, 2 Mar 2022 13:38:11 +0000 (14:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Mar 2022 13:39:39 +0000 (14:39 +0100)
gcc 6 continues its saga with excessive reports of null-deref warnings.
This time it was in the IS_HTX_CS() macro. Let's use __cs_conn() after
cs_conn() was checked.

include/haproxy/conn_stream.h

index fffbc62291fc48de0bf3153c8553696e39e0c41d..e69f9c1701dceab974626d71948c0b9506c9d3b2 100644 (file)
@@ -32,7 +32,7 @@ struct stream;
 struct stream_interface;
 struct check;
 
-#define IS_HTX_CS(cs)     (cs_conn(cs) && IS_HTX_CONN(cs_conn(cs)))
+#define IS_HTX_CS(cs)     (cs_conn(cs) && IS_HTX_CONN(__cs_conn(cs)))
 
 struct conn_stream *cs_new();
 void cs_free(struct conn_stream *cs);