]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: haterm: Remove useless IS_HTX_SC() test
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 May 2026 13:51:24 +0000 (15:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 May 2026 16:36:34 +0000 (18:36 +0200)
Haterm is an HTTP endpoint. No reason to test if its sc is an HTX sc or
not. Let's remove Is_HTX_SC() test.

src/haterm.c

index 9afd93e17f8b0c718bd7cbbdd7f8df6d2fe4e76b..e5a74e32a3d01533e0238ee5930ee216f3960190 100644 (file)
@@ -267,7 +267,7 @@ static int hstream_htx_buf_rcv(struct connection *conn, struct hstream *hs)
        while (sc_ep_test(hs->sc, SE_FL_RCV_MORE) ||
               (!(conn->flags & CO_FL_ERROR) && !sc_ep_test(hs->sc, SE_FL_ERROR | SE_FL_EOS))) {
                htx_reset(htxbuf(&hs->req));
-               max = (IS_HTX_SC(hs->sc) ?  htx_free_space(htxbuf(&hs->req)) : b_room(&hs->req));
+               max = htx_free_space(htxbuf(&hs->req));
                sc_ep_clr(hs->sc, SE_FL_WANT_ROOM);
                read = CALL_MUX_WITH_RET(conn->mux, rcv_buf(hs->sc, &hs->req, max, 0));
                cur_read += read;