diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-05-23 19:25:12 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2012-05-23 19:25:12 +0000 |
commit | 298f5ad9040c0b93ccd39f1e110caab2684070a4 (patch) | |
tree | d25cfab90de9052fd97269b828e99beabbe85cbc /usr.bin/aucat/siofile.c | |
parent | 6512e92d37b1b4f867171e80f8d8574b6f22912a (diff) |
Make the "default" string a valid device name that has the same effect
as NULL has. This will (hopefully) simplify ports where the user
passes the device string.
Diffstat (limited to 'usr.bin/aucat/siofile.c')
-rw-r--r-- | usr.bin/aucat/siofile.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.bin/aucat/siofile.c b/usr.bin/aucat/siofile.c index 2517f0f9734..426c9e34281 100644 --- a/usr.bin/aucat/siofile.c +++ b/usr.bin/aucat/siofile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siofile.c,v 1.10 2012/04/11 06:05:43 ratchov Exp $ */ +/* $OpenBSD: siofile.c,v 1.11 2012/05/23 19:25:11 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -209,22 +209,20 @@ siofile_new(struct fileops *ops, char *path, unsigned int *rmode, struct aparams *ipar, struct aparams *opar, unsigned int *bufsz, unsigned int *round) { - char *siopath; struct sio_par par; struct sio_hdl *hdl; struct siofile *f; unsigned int mode = *rmode; - siopath = (strcmp(path, "default") == 0) ? NULL : path; - hdl = sio_open(siopath, mode, 1); + hdl = sio_open(path, mode, 1); if (hdl == NULL) { if (mode != (SIO_PLAY | SIO_REC)) return NULL; - hdl = sio_open(siopath, SIO_PLAY, 1); + hdl = sio_open(path, SIO_PLAY, 1); if (hdl != NULL) mode = SIO_PLAY; else { - hdl = sio_open(siopath, SIO_REC, 1); + hdl = sio_open(path, SIO_REC, 1); if (hdl != NULL) mode = SIO_REC; else |