]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stconn: Fix sc_mux_strm() return value
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Apr 2024 13:29:57 +0000 (15:29 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Apr 2024 13:31:06 +0000 (15:31 +0200)
Since the begining, this function returns a pointer on an appctx while it
should be a void pointer. It is the caller responsibility to cast it to the
right type, the corresponding mux stream in this case.

However, it is not a big deal because this function is unused for now. Only
the unsafe one is used.

This patch must be backported as far as 2.6.

include/haproxy/stconn.h

index 2582ba38d7ec030e618a892957b4d2ec218858d3..c28edc2c39d3cd5a3c319227b2a7aeb342d6fa36 100644 (file)
@@ -255,7 +255,7 @@ static inline void *__sc_mux_strm(const struct stconn *sc)
 {
        return __sc_endp(sc);
 }
-static inline struct appctx *sc_mux_strm(const struct stconn *sc)
+static inline void *sc_mux_strm(const struct stconn *sc)
 {
        if (sc_ep_test(sc, SE_FL_T_MUX))
                return __sc_mux_strm(sc);