mirror of https://github.com/ericonr/sndio.git
use stored d->num, in search for devices
This commit is contained in:
parent
a17c9dfc55
commit
d4cea96993
|
@ -1226,7 +1226,7 @@ dev_bynum(int num)
|
||||||
struct dev *d;
|
struct dev *d;
|
||||||
|
|
||||||
for (d = dev_list; d != NULL; d = d->next) {
|
for (d = dev_list; d != NULL; d = d->next) {
|
||||||
if (num-- == 0)
|
if (d->num == num)
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue