On Mon, 2016-02-22 at 17:19 +0900, Jungsup Lee wrote: > Simplify code by using PA_IDXSET_FOREACH. > > Signed-off-by: Jungsup Lee <jungsup4.lee at samsung.com> > --- > Â src/modules/module-role-cork.c | 4 ++-- > Â 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c > index 7c0f59f..4ae2005 100644 > --- a/src/modules/module-role-cork.c > +++ b/src/modules/module-role-cork.c > @@ -70,7 +70,7 @@ static bool shall_cork(struct userdata *u, pa_sink *s, pa_sink_input *ignore) { > Â Â Â Â Â 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) { > Â Â Â Â Â Â Â Â Â const char *role; > Â > Â Â Â Â Â Â Â Â Â if (j == ignore) > @@ -99,7 +99,7 @@ static inline void apply_cork_to_sink(struct userdata *u, pa_sink *s, pa_sink_in > Â Â Â Â Â 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, corked_here; > Â Â Â Â Â Â Â Â Â const char *role; This doesn't apply on master any more, but a similar patch for src/modules/stream-interaction.c would be welcome. --Â Tanu