[PATCH] role-cork: Use the PA_IDXSET_FOREACH macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;

--
2.6.4


<div id="DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #aaabb6;">
	<tr>
		
		<td style="width: 470px; padding-top: 20px; color: #41424e;
font-size: 13px; font-family: Arial, Helvetica, sans-serif;
line-height: 18px;">본 ì?´ë©?ì?¼ì?? Avastë¡? ë³´í?¸ë??ë?? ì??ì ?í?? ì»´í?¨í?°ì??ì?? ë°?ì?¡ë??ì??ì?µë??ë?¤. <br /><a
href="https://www.avast.com/sig-email"; target="_blank" style="color:
#4453ea;">www.avast.com</a> 		</td>
	</tr>
</table>
<a href="#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux