]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h1: Remove first useless test on count in h1_process_output()
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Jan 2021 09:22:28 +0000 (10:22 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Jan 2021 12:16:32 +0000 (13:16 +0100)
h1_process_output() function is never called with no data to send (count ==
0). Thus, the first test on count, at the beginning of the function is
useless and may be removed. This way, by reading the code, it is obvious the
<chn_htx> variable is always defined.

This patch should fix the issue #1085.

src/mux_h1.c

index 0a334278cd52070a958bc2cc1df823d4931eca32..3837f7a4389245524c601af26dabc8510b56ba53 100644 (file)
@@ -1741,9 +1741,6 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
        int last_data = 0;
        int ws_key_found = 0;
 
-       if (!count)
-               goto end;
-
        chn_htx = htxbuf(buf);
        TRACE_ENTER(H1_EV_TX_DATA, h1c->conn, h1s, chn_htx, (size_t[]){count});