From 429b91d308d29934425a1ff8ee1eb0a54c8f492c Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 14 May 2019 22:04:36 +0200 Subject: [PATCH] MINOR: htx: Remove the macro IS_HTX_SMP() and always use IS_HTX_STRM() instead 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 | 1 - src/payload.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h index ef028cd60..2f8be3f5e 100644 --- a/include/proto/proto_http.h +++ b/include/proto/proto_http.h @@ -30,7 +30,6 @@ #include #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; diff --git a/src/payload.c b/src/payload.c index a16f8c601..f9b5fe02a 100644 --- a/src/payload.c +++ b/src/payload.c @@ -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); }