From: Christopher Faulet Date: Tue, 14 May 2019 20:04:36 +0000 (+0200) Subject: MINOR: htx: Remove the macro IS_HTX_SMP() and always use IS_HTX_STRM() instead X-Git-Tag: v2.0-dev5~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=429b91d308d29934425a1ff8ee1eb0a54c8f492c;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h index ef028cd600..2f8be3f5ec 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 a16f8c601b..f9b5fe02a9 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); }