diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2024-05-06 05:37:27 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2024-05-06 05:37:27 +0000 |
commit | 36557df4fcdba53bd002fe14ffa213e1ca8a207c (patch) | |
tree | 6ab218c7c49e5def6aaba398ee69ca2be0d6d743 /usr.bin/sndiod | |
parent | 8e682c9684b4ea0bdf49fdaa2c5a5590e5ec5c9f (diff) |
sndiod: Ignore server.device settings to a non-working device
Diffstat (limited to 'usr.bin/sndiod')
-rw-r--r-- | usr.bin/sndiod/dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index ec9452d941f..a5fc85e74eb 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.112 2024/04/22 11:01:02 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.113 2024/05/06 05:37:26 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> * @@ -2450,8 +2450,8 @@ ctl_setval(struct ctl *c, int val) c->curval = val; return 1; case CTL_OPT_DEV: - c->u.opt_dev.opt->alt_first = c->u.opt_dev.dev; - opt_setdev(c->u.opt_dev.opt, c->u.opt_dev.dev); + if (opt_setdev(c->u.opt_dev.opt, c->u.opt_dev.dev)) + c->u.opt_dev.opt->alt_first = c->u.opt_dev.dev; return 1; default: if (log_level >= 2) { |