]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: htx: Remove the macro IS_HTX_SMP() and always use IS_HTX_STRM() instead
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 May 2019 20:04:36 +0000 (22:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 05:42:12 +0000 (07:42 +0200)
The macro IS_HTX_SMP() is only used at a place, in a context where the stream
always exists. So, we can remove it to use IS_HTX_STRM() instead.

include/proto/proto_http.h
src/payload.c

index ef028cd6001dd4b2b62a5ba29472bc7e1651e059..2f8be3f5ec09b1037933b355c6ae3e52652b150f 100644 (file)
@@ -30,7 +30,6 @@
 #include <proto/stream.h>
 
 #define IS_HTX_STRM(strm) ((strm)->flags & SF_HTX)
-#define IS_HTX_SMP(smp)   ((smp)->strm && IS_HTX_STRM((smp)->strm))
 
 extern struct pool_head *pool_head_uniqueid;
 
index a16f8c601b4a12dcc98a4e623f956ec5d37dcdf1..f9b5fe02a9d3897df57c7a962216e58f34259648 100644 (file)
@@ -55,7 +55,7 @@ smp_fetch_len(const struct arg *args, struct sample *smp, const char *kw, void *
 
        chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
        smp->data.type = SMP_T_SINT;
-       if (IS_HTX_SMP(smp)) {
+       if (IS_HTX_STRM(smp->strm)) {
                struct htx *htx = htxbuf(&chn->buf);
                smp->data.u.sint = htx->data - co_data(chn);
        }