=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/aucat/Attic/miofile.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/aucat/Attic/miofile.c 2010/01/10 21:47:41 1.4 +++ src/usr.bin/aucat/Attic/miofile.c 2010/06/04 06:15:28 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: miofile.c,v 1.4 2010/01/10 21:47:41 ratchov Exp $ */ +/* $OpenBSD: miofile.c,v 1.5 2010/06/04 06:15:28 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -64,19 +64,19 @@ struct miofile * miofile_new(struct fileops *ops, char *path, int input, int output) { + char *siopath; struct mio_hdl *hdl; struct miofile *f; int mode = 0; + siopath = (strcmp(path, "default") == 0) ? NULL : path; if (input) mode |= MIO_IN; if (output) mode |= MIO_OUT; - hdl = mio_open(path, mode, 1); + hdl = mio_open(siopath, mode, 1); if (hdl == NULL) return NULL; - if (path == NULL) - path = "default"; f = (struct miofile *)file_new(ops, path, mio_nfds(hdl)); if (f == NULL) goto bad_close;