diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-04-16 11:51:49 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-04-16 11:51:49 +0000 |
commit | 31ff77deb3c81ac6f972b05801983ab0108737f7 (patch) | |
tree | 0eb2d8227e8957354e8538b05ab0c1e993b1ebf2 | |
parent | d1c3acc006eee5f6b9d7c68915583fcf0330a65b (diff) |
for unix domain socket addresses use AUCAT_PATH and MIDICAT_PATH
macros instead of hardcoded strings. No object change
-rw-r--r-- | lib/libsndio/mio_aucat.c | 6 | ||||
-rw-r--r-- | lib/libsndio/sio_aucat.c | 4 | ||||
-rw-r--r-- | usr.bin/aucat/aucat.c | 6 | ||||
-rw-r--r-- | usr.bin/aucat/conf.h | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/libsndio/mio_aucat.c b/lib/libsndio/mio_aucat.c index 25d825453e2..498849d2d4e 100644 --- a/lib/libsndio/mio_aucat.c +++ b/lib/libsndio/mio_aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mio_aucat.c,v 1.2 2011/04/16 10:52:22 ratchov Exp $ */ +/* $OpenBSD: mio_aucat.c,v 1.3 2011/04/16 11:51:47 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -73,13 +73,13 @@ bad: struct mio_hdl * mio_midithru_open(const char *str, unsigned mode, int nbio) { - return mio_xxx_open(str, "midithru", mode, nbio); + return mio_xxx_open(str, MIDICAT_PATH, mode, nbio); } struct mio_hdl * mio_aucat_open(const char *str, unsigned mode, int nbio) { - return mio_xxx_open(str, "softaudio", mode, nbio); + return mio_xxx_open(str, AUCAT_PATH, mode, nbio); } static void diff --git a/lib/libsndio/sio_aucat.c b/lib/libsndio/sio_aucat.c index 42e86a0727e..83b73bd8545 100644 --- a/lib/libsndio/sio_aucat.c +++ b/lib/libsndio/sio_aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sio_aucat.c,v 1.3 2011/04/16 11:24:18 ratchov Exp $ */ +/* $OpenBSD: sio_aucat.c,v 1.4 2011/04/16 11:51:47 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -146,7 +146,7 @@ sio_aucat_open(const char *str, unsigned mode, int nbio) hdl = malloc(sizeof(struct sio_aucat_hdl)); if (hdl == NULL) return NULL; - if (!aucat_open(&hdl->aucat, str, "softaudio", mode, nbio)) { + if (!aucat_open(&hdl->aucat, str, AUCAT_PATH, mode, nbio)) { free(hdl); return NULL; } diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index 18b3e07148b..9eca115936d 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.108 2011/03/17 07:55:35 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.109 2011/04/16 11:51:48 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -764,7 +764,7 @@ aucat_main(int argc, char **argv) } if (nsock > 0) { snprintf(path, sizeof(path), "%s/%s%u", base, - DEFAULT_SOFTAUDIO, unit); + AUCAT_PATH, unit); listen = listen_new(&listen_ops, path); if (listen == NULL) exit(1); @@ -1034,7 +1034,7 @@ midicat_main(int argc, char **argv) } if (nsock > 0) { snprintf(path, sizeof(path), "%s/%s%u", base, - DEFAULT_MIDITHRU, unit); + MIDICAT_PATH, unit); listen = listen_new(&listen_ops, path); if (listen == NULL) exit(1); diff --git a/usr.bin/aucat/conf.h b/usr.bin/aucat/conf.h index adbe17b12fe..9ea32eb44ff 100644 --- a/usr.bin/aucat/conf.h +++ b/usr.bin/aucat/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.16 2010/10/21 18:57:42 ratchov Exp $ */ +/* $OpenBSD: conf.h,v 1.17 2011/04/16 11:51:48 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -33,8 +33,8 @@ extern int debug_level; /* * socket and option names */ -#define DEFAULT_MIDITHRU "midithru" -#define DEFAULT_SOFTAUDIO "softaudio" +#define MIDICAT_PATH "midithru" +#define AUCAT_PATH "softaudio" #define DEFAULT_OPT "default" /* |