aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSangchul Lee <sangchul1011@gmail.com>2019-03-18 14:45:14 +0900
committerGeorg Chini <georg@chini.tk>2019-03-26 14:54:15 +0000
commit5540f728e52e9c369079e3ac83b8bc55e3519079 (patch)
tree7163c201cb600ff883af8f7966394da8f451ebc0
parent0f4f109a3c1035ef3d8321ff836f83b3b6157326 (diff)
downloadpulseaudio-5540f728e52e9c369079e3ac83b8bc55e3519079.tar.gz
stream-interaction: Use PA_IDXSET_FOREACH macro to iterate idxset
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
-rw-r--r--src/modules/stream-interaction.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/stream-interaction.c b/src/modules/stream-interaction.c
index f451cd88..96c0ac77 100644
--- a/src/modules/stream-interaction.c
+++ b/src/modules/stream-interaction.c
@@ -187,7 +187,7 @@ static inline void apply_interaction_to_sink(struct userdata *u, pa_sink *s, con
pa_assert(u);
pa_sink_assert_ref(s);
- for (j = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx)); j; j = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx))) {
+ PA_IDXSET_FOREACH(j, s->inputs, idx) {
bool corked, interaction_applied;
const char *role;
@@ -247,9 +247,7 @@ static void remove_interactions(struct userdata *u, struct group *g) {
const char *role;
PA_IDXSET_FOREACH(s, u->core->sinks, idx) {
-
- for (j = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx_input)); j; j = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx_input))) {
-
+ PA_IDXSET_FOREACH(j, s->inputs, idx_input) {
if(!!pa_hashmap_get(g->interaction_state, j)) {
corked = (j->state == PA_SINK_INPUT_CORKED);
if (!(role = pa_proplist_gets(j->proplist, PA_PROP_MEDIA_ROLE)))