summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-04-28 07:20:04 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-04-28 07:20:04 +0000
commit44aba59e1a5ebcc365631e28fd6cd4671d41eb4c (patch)
tree4bf8e443221fd89a7d71879bda134ef13713bd17
parentc95e4bb8ec58c762b12a1e12c528235fcc1a6a8d (diff)
remove deadcode, use err(1, "%s", str) instead of err(1, str)
from Michael W. Bombardieri <mb at ii.net>, thanks!
-rw-r--r--usr.bin/aucat/aparams.c27
-rw-r--r--usr.bin/aucat/aproc.c4
2 files changed, 5 insertions, 26 deletions
diff --git a/usr.bin/aucat/aparams.c b/usr.bin/aucat/aparams.c
index f0e2cbb6ade..ad9d364d205 100644
--- a/usr.bin/aucat/aparams.c
+++ b/usr.bin/aucat/aparams.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aparams.c,v 1.12 2010/11/05 15:23:18 ratchov Exp $ */
+/* $OpenBSD: aparams.c,v 1.13 2011/04/28 07:20:03 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -45,6 +45,7 @@ int aparams_ctltovol[128] = {
*/
struct aparams aparams_none = { 1, 0, 0, 0, 0, 0, 0, 0 };
+#ifdef DEBUG
/*
* Generate a string corresponding to the encoding in par,
* return the length of the resulting string.
@@ -74,6 +75,7 @@ aparams_enctostr(struct aparams *par, char *ostr)
*p++ = '\0';
return p - ostr - 1;
}
+#endif /* DEBUG */
/*
* Parse an encoding string, examples: s8, u8, s16, s16le, s24be ...
@@ -222,29 +224,6 @@ aparams_eqenc(struct aparams *par1, struct aparams *par2)
}
/*
- * Return true if both parameters are the same.
- */
-int
-aparams_eq(struct aparams *par1, struct aparams *par2)
-{
- if (!aparams_eqenc(par1, par2) ||
- par1->cmin != par2->cmin ||
- par1->cmax != par2->cmax ||
- par1->rate != par2->rate)
- return 0;
- return 1;
-}
-
-/*
- * Return true if first channel range includes second range.
- */
-int
-aparams_subset(struct aparams *subset, struct aparams *set)
-{
- return subset->cmin >= set->cmin && subset->cmax <= set->cmax;
-}
-
-/*
* Grow channels range and sample rate of ``set'' in order ``subset'' to
* become an actual subset of it.
*/
diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c
index f74beb4ae32..345f9300769 100644
--- a/usr.bin/aucat/aproc.c
+++ b/usr.bin/aucat/aproc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aproc.c,v 1.63 2010/11/04 17:55:28 ratchov Exp $ */
+/* $OpenBSD: aproc.c,v 1.64 2011/04/28 07:20:03 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -158,7 +158,7 @@ aproc_new(struct aproc_ops *ops, char *name)
p = malloc(sizeof(struct aproc));
if (p == NULL)
- err(1, name);
+ err(1, "%s", name);
LIST_INIT(&p->ins);
LIST_INIT(&p->outs);
p->name = name;