diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-06-20 11:32:55 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-06-20 11:32:55 +0000 |
commit | 40f6914df234f53195f128fe7fe159b2ea3ec390 (patch) | |
tree | cd3d639e34fb6507510e80fda4809246b5ab62df | |
parent | e8594514dec26b3702472dfb4a43a224ec2ee735 (diff) |
fix midicat(1) device mode when only -i or only -o is used (ie
open the device input-only if -o is used, and output-only if -i is
used).
-rw-r--r-- | usr.bin/aucat/aucat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index e619167a9be..3db6b56a4da 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.94 2010/06/05 16:00:52 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.95 2010/06/20 11:32:54 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -930,8 +930,8 @@ midicat_main(int argc, char **argv) cm = SLIST_FIRST(&mids); SLIST_REMOVE_HEAD(&mids, entry); if (!dev_thruadd(d, cm->path, - !SLIST_EMPTY(&ins) || l_flag, - !SLIST_EMPTY(&outs) || l_flag)) { + !SLIST_EMPTY(&outs) || l_flag, + !SLIST_EMPTY(&ins) || l_flag)) { errx(1, "%s: can't open device", cm->path); } free(cm); |