diff options
-rw-r--r-- | usr.bin/sndiod/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index b19acb7b170..c718ee1bec1 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.18 2015/09/05 11:19:20 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.19 2015/11/23 10:02:42 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -1223,7 +1223,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; |