It's just because it sees that qcs_sc(qcs) can return a NULL, but on
the second call it forgets it just tested it, as usual. Let's pass it
via a local variable.
static void qcs_alert(struct qcs *qcs)
{
unsigned int state = TASK_WOKEN_MSG;
+ const struct stconn *sc;
TRACE_POINT(QMUX_EV_STRM_WAKE, qcs->qcc->conn, qcs);
- if (!qcs_sc(qcs))
+ sc = qcs_sc(qcs);
+ if (!sc)
return;
if (qcs->subs) {
qcs->subs = NULL;
state |= TASK_WOKEN_IO;
}
- tasklet_wakeup(qcs_sc(qcs)->wait_event.tasklet, state);
+ tasklet_wakeup(sc->wait_event.tasklet, state);
}
int qcs_subscribe(struct qcs *qcs, int event_type, struct wait_event *es)