From a9b7796862e2ab61745d142dde82e615407fee46 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 31 Jan 2019 07:23:00 +0100 Subject: [PATCH] MINOR: mux-h2: consistently rely on the htx variable to detect the mode In h2_frt_transfer_data(), we support both HTX and legacy modes. The HTX mode is detected from the proxy option and sets a valid pointer into the htx variable. Better rely on this variable in all the function rather than testing the option again. This way the code is clearer and even the compiler knows this pointer is valid when it's dereferenced. This should be backported to 1.9 if the b_is_null() patch is backported. --- src/mux_h2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 51e3ee9..dc91756 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -3524,7 +3524,7 @@ try_again: goto fail; } - if (h2c->proxy->options2 & PR_O2_USE_HTX) { + if (htx) { block1 = htx_free_data_space(htx); if (!block1) { h2c->flags |= H2_CF_DEM_SFULL; -- 1.7.10.4