From: Christopher Faulet Date: Thu, 6 Apr 2023 06:48:16 +0000 (+0200) Subject: MINOR: applet: Use unsafe version to get stream from SC in the trace function X-Git-Tag: v2.8-dev7~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8eeec38bfa86bb126b026539e2b4744c73c701e2;p=thirdparty%2Fhaproxy.git MINOR: applet: Use unsafe version to get stream from SC in the trace function When a trace message for an applet is dumped, if the SC exists, the stream always exists too. There is no way to attached an applet to a health-check. So, we can use the unsafe version __sc_strm() to get the stream. This patch is related to #2106. Not sure it will be enough for Coverity. However, there is no bug here. --- diff --git a/src/applet.c b/src/applet.c index 41f1b08035..a4702d48a3 100644 --- a/src/applet.c +++ b/src/applet.c @@ -105,7 +105,7 @@ static void applet_trace(enum trace_level level, uint64_t mask, const struct tra sc = appctx_sc(appctx); if (sc) { - s = sc_strm(sc); + s = __sc_strm(sc); sco = sc_opposite(sc); ic = sc_ic(sc); oc = sc_oc(sc);