Get the first input cleanly

This commit is contained in:
Rodrigo Arias 2023-02-17 17:28:39 +01:00 committed by Rodrigo Arias Mallo
parent 9d3fe80e93
commit 9d7ff947b1

View File

@ -210,7 +210,7 @@ thread_select_active(struct mux *mux,
case TH_ST_RUNNING:
case TH_ST_COOLING:
case TH_ST_WARMING:
*input = mux->input;
*input = mux_get_input(mux, 0);
break;
default:
*input = NULL;
@ -244,7 +244,7 @@ thread_select_running(struct mux *mux,
switch (state) {
case TH_ST_RUNNING:
*input = mux->input;
*input = mux_get_input(mux, 0);
break;
default:
*input = NULL;
@ -274,7 +274,7 @@ thread_select_any(struct mux *mux,
return -1;
}
*input = mux->input;
*input = mux_get_input(mux, 0);
return 0;
}