CLEANUP: mux-h2: remove misleading leftover test on h2s' nullity

The WINDOW_UPDATE and DATA frame handlers used to still have a check on
h2s to return either h2s_error() or h2c_error(). This is a leftover from
the early code. The h2s cannot be null there anymore as it has already
been dereferenced before reaching these locations.
This commit is contained in:
Willy Tarreau 2019-01-30 15:42:44 +01:00
parent 13ebef7ecb
commit 6432dc8783

View File

@ -1771,12 +1771,8 @@ static int h2c_handle_window_update(struct h2c *h2c, struct h2s *h2s)
return 0; return 0;
strm_err: strm_err:
if (h2s) {
h2s_error(h2s, error); h2s_error(h2s, error);
h2c->st0 = H2_CS_FRAME_E; h2c->st0 = H2_CS_FRAME_E;
}
else
h2c_error(h2c, error);
return 0; return 0;
} }
@ -2143,12 +2139,8 @@ static int h2c_frt_handle_data(struct h2c *h2c, struct h2s *h2s)
return 0; return 0;
strm_err: strm_err:
if (h2s) {
h2s_error(h2s, error); h2s_error(h2s, error);
h2c->st0 = H2_CS_FRAME_E; h2c->st0 = H2_CS_FRAME_E;
}
else
h2c_error(h2c, error);
return 0; return 0;
} }