diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-02-06 08:26:35 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-02-06 08:26:35 +0000 |
commit | ab1f036c3ce84d881366ec56ce777caa5d20ee41 (patch) | |
tree | 5b299436471ab9d7dbd76bf303f084b1beaaf1eb /usr.bin/aucat/safile.c | |
parent | 1739b3246b297c58796b4c861336f866c65e6fea (diff) |
move error messages reported to user into main()
Diffstat (limited to 'usr.bin/aucat/safile.c')
-rw-r--r-- | usr.bin/aucat/safile.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/aucat/safile.c b/usr.bin/aucat/safile.c index 7d879bbe8dd..392df9556e7 100644 --- a/usr.bin/aucat/safile.c +++ b/usr.bin/aucat/safile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safile.c,v 1.11 2009/02/04 20:35:14 ratchov Exp $ */ +/* $OpenBSD: safile.c,v 1.12 2009/02/06 08:26:34 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -97,15 +97,9 @@ safile_new(struct fileops *ops, char *path, mode |= SIO_REC; if (opar) mode |= SIO_PLAY; - if (!mode) { - fprintf(stderr, "select at least play or record mode\n"); - return NULL; - } hdl = sio_open(path, mode, 1); - if (hdl == NULL) { - fprintf(stderr, "safile_new: can't open device\n"); + if (hdl == NULL) return NULL; - } sio_initpar(&par); if (ipar) { par.bits = ipar->bits; |