CLEANUP: muxes: Consider stream's sd as defined in .show_fd callback functions
In muxes, the stream-endoint descriptor of a stream is always defined. Thus,
in .show_fd callback functions, there is no reason to test it.
This patch should address the issue #1727.
.
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index c93f7c8..26240cf 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -4192,12 +4192,12 @@
(unsigned int)b_data(&fstrm->rxbuf), b_orig(&fstrm->rxbuf),
(unsigned int)b_head_ofs(&fstrm->rxbuf), (unsigned int)b_size(&fstrm->rxbuf),
fcgi_strm_sc(fstrm));
- if (fstrm->sd) {
- chunk_appendf(msg, " .sd.flg=0x%08x", se_fl_get(fstrm->sd));
- if (!se_fl_test(fstrm->sd, SE_FL_ORPHAN))
- chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
- fcgi_strm_sc(fstrm)->flags, fcgi_strm_sc(fstrm)->app);
- }
+
+ chunk_appendf(msg, " .sd.flg=0x%08x", se_fl_get(fstrm->sd));
+ if (!se_fl_test(fstrm->sd, SE_FL_ORPHAN))
+ chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
+ fcgi_strm_sc(fstrm)->flags, fcgi_strm_sc(fstrm)->app);
+
chunk_appendf(&trash, " .subs=%p", fstrm->subs);
if (fstrm->subs) {
chunk_appendf(&trash, "(ev=%d tl=%p", fstrm->subs->events, fstrm->subs->tasklet);
diff --git a/src/mux_h1.c b/src/mux_h1.c
index a7ebf11..929867b 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -3914,13 +3914,12 @@
h1s, h1s->flags, se_fl_get(h1s->sd),
h1m_state_str(h1s->req.state),
h1m_state_str(h1s->res.state), method, h1s->status);
- if (h1s->sd) {
- chunk_appendf(msg, " .sd.flg=0x%08x",
- se_fl_get(h1s->sd));
- if (!se_fl_test(h1s->sd, SE_FL_ORPHAN))
- chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
- h1s_sc(h1s)->flags, h1s_sc(h1s)->app);
- }
+
+ chunk_appendf(msg, " .sd.flg=0x%08x", se_fl_get(h1s->sd));
+ if (!se_fl_test(h1s->sd, SE_FL_ORPHAN))
+ chunk_appendf(msg, " .sc.flg=0x%08x .sc.app=%p",
+ h1s_sc(h1s)->flags, h1s_sc(h1s)->app);
+
chunk_appendf(&trash, " .subs=%p", h1s->subs);
if (h1s->subs) {
chunk_appendf(&trash, "(ev=%d tl=%p", h1s->subs->events, h1s->subs->tasklet);
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 20c646f..bdd47f5 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -6767,9 +6767,7 @@
h2s_sc(h2s)->flags, h2s_sc(h2s)->app);
chunk_appendf(msg, "sd=%p", h2s->sd);
- if (h2s->sd)
- chunk_appendf(msg, "(.flg=0x%08x)",
- se_fl_get(h2s->sd));
+ chunk_appendf(msg, "(.flg=0x%08x)", se_fl_get(h2s->sd));
chunk_appendf(&trash, " .subs=%p", h2s->subs);
if (h2s->subs) {