summaryrefslogtreecommitdiff
path: root/audio/fmio/files/patch-mixer.c
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-03-18 18:56:28 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-03-18 18:56:28 +0000
commitf3249b265a15830a216466571ecd0387c898c3f0 (patch)
tree700b8059f6158422541b0fdb618c37b6a0e4a014 /audio/fmio/files/patch-mixer.c
parentRemove giconv hacks. (diff)
- Update to 1.2.18;
- pass over maintainership to Olexander Kunitsa <kunia@istc.kiev.ua> (maintainer timeout). Submitted by: Olexander Kunitsa <kunia@istc.kiev.ua>
Notes
Notes: svn path=/head/; revision=56311
Diffstat (limited to 'audio/fmio/files/patch-mixer.c')
-rw-r--r--audio/fmio/files/patch-mixer.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/audio/fmio/files/patch-mixer.c b/audio/fmio/files/patch-mixer.c
deleted file mode 100644
index 5550b10af99f..000000000000
--- a/audio/fmio/files/patch-mixer.c
+++ /dev/null
@@ -1,37 +0,0 @@
---- mixer.c.orig Mon Apr 2 23:12:21 2001
-+++ mixer.c Fri Aug 10 23:22:04 2001
-@@ -49,6 +49,8 @@
- static int num_channels;
- #endif /* __OpenBSD__ || __NetBSD__ */
-
-+#define MIN(a, b) ((a) < (b) ? (a) : (b))
-+
- static unsigned int volume;
-
- static int
-@@ -167,7 +169,7 @@
- break;
- }
- } else {
-- fprintf(stderr, "Bad numbers %s", q);
-+ fprintf(stderr, "Bad numbers %s\n", q);
- return -1;
- }
- }
-@@ -298,9 +300,13 @@
- int devlen, dev_volume;
-
- devlen = strcspn(vol, "=");
-- strncpy(dev, vol, devlen);
-- strncpy(val, &vol[devlen+1], strlen(vol)-devlen-1);
--
-+ if (devlen == strlen(vol)) {
-+ fprintf(stderr, "invalid volume specifier %s\n", vol);
-+ return -1;
-+ }
-+ strlcpy(dev, vol, MIN(devlen + 1, sizeof(dev)));
-+ strlcpy(val, &vol[devlen+1], MIN(strlen(vol)-devlen, sizeof(val)));
-+
- #if defined (__OpenBSD__) || (__NetBSD__)
-
- for ( ndev = 0 ; ; ndev++ ) {