summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-20 11:08:38 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-20 11:08:38 +0100
commitb87627e11f6845e2db24d60702ce681b5910742b (patch)
treea2417acb89bf2e0a44fdeb9396e07d1f2e4664bd /src
parentd6bc83ee3adc13c9ffe2a972c00061d02c7345a7 (diff)
downloadpa-sink-ctl-b87627e11f6845e2db24d60702ce681b5910742b.tar.gz
pa-sink-ctl-b87627e11f6845e2db24d60702ce681b5910742b.tar.bz2
pa-sink-ctl-b87627e11f6845e2db24d60702ce681b5910742b.zip
Fix endless loop in slave_ctl_{prev,next}_ctl
Diffstat (limited to 'src')
-rw-r--r--src/pa-sink-ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c
index 181ccaa..4e17337 100644
--- a/src/pa-sink-ctl.c
+++ b/src/pa-sink-ctl.c
@@ -269,7 +269,7 @@ slave_ctl_prev_ctl(struct vol_ctl *ctl)
if (el == NULL)
return NULL;
- while ((prev = el->prev)) {
+ for (prev = el->prev; prev; prev = prev->prev) {
struct slave_ctl *t = prev->data;
if (t->parent_index == sctl->parent_index)
return &t->base;
@@ -288,7 +288,7 @@ slave_ctl_next_ctl(struct vol_ctl *ctl)
if (el == NULL)
return NULL;
- while ((next = el->next)) {
+ for (next = el->next; next; next = next->next) {
struct slave_ctl *t = next->data;
if (t->parent_index == sctl->parent_index)
return &t->base;