From: Willy Tarreau Date: Tue, 29 Jan 2019 17:51:41 +0000 (+0100) Subject: CLEANUP: mux-h2: remove two useless but misleading assignments X-Git-Tag: v2.0-dev1~123 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1e6fa35deb08de6025e0126495d3424ca564282;p=thirdparty%2Fhaproxy.git CLEANUP: mux-h2: remove two useless but misleading assignments h2c->st0 was assigned to H2_CS_ERROR right after returning from h2c_error(), which had already done it. It's useless and confusing, let's remove this. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index f74ae32888..afb3ad53bd 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2237,7 +2237,6 @@ static void h2_process_demux(struct h2c *h2c) if ((int)hdr.len < 0 || (int)hdr.len > global.tune.bufsize) { h2c_error(h2c, H2_ERR_FRAME_SIZE_ERROR); - h2c->st0 = H2_CS_ERROR; if (!h2c->nb_streams) { /* only log if no other stream can report the error */ sess_log(h2c->conn->owner); @@ -2310,7 +2309,6 @@ static void h2_process_demux(struct h2c *h2c) * this state MUST be treated as a connection error */ h2c_error(h2c, H2_ERR_PROTOCOL_ERROR); - h2c->st0 = H2_CS_ERROR; if (!h2c->nb_streams) { /* only log if no other stream can report the error */ sess_log(h2c->conn->owner);