From d4cea96993875c44bda591ab53802e5e40a0601e Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 25 Nov 2015 20:48:47 +0100 Subject: [PATCH] use stored d->num, in search for devices --- sndiod/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sndiod/dev.c b/sndiod/dev.c index 7720e39..04da363 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -1226,7 +1226,7 @@ dev_bynum(int num) struct dev *d; for (d = dev_list; d != NULL; d = d->next) { - if (num-- == 0) + if (d->num == num) return d; } return NULL;