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.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 8f8c37b..4019ec1 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -1771,12 +1771,8 @@
return 0;
strm_err:
- if (h2s) {
- h2s_error(h2s, error);
- h2c->st0 = H2_CS_FRAME_E;
- }
- else
- h2c_error(h2c, error);
+ h2s_error(h2s, error);
+ h2c->st0 = H2_CS_FRAME_E;
return 0;
}
@@ -2143,12 +2139,8 @@
return 0;
strm_err:
- if (h2s) {
- h2s_error(h2s, error);
- h2c->st0 = H2_CS_FRAME_E;
- }
- else
- h2c_error(h2c, error);
+ h2s_error(h2s, error);
+ h2c->st0 = H2_CS_FRAME_E;
return 0;
}