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.
This commit is contained in:
Christopher Faulet 2019-05-14 22:04:36 +02:00 committed by Willy Tarreau
parent b01302f9ac
commit 429b91d308
2 changed files with 1 additions and 2 deletions

View 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;

View 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);
}