summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-05 10:49:24 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2014-01-04 15:42:26 +0100
commit4e756def51a8af5d914bd5c1cef768753a90c4a8 (patch)
tree2d1a7eef4e139c0258dc02dbd032ebfa40e5b6ec
parent28c1bdcac28609eec0d83528b58cb21fe087491e (diff)
downloadpjctl-4e756def51a8af5d914bd5c1cef768753a90c4a8.tar.gz
pjctl-4e756def51a8af5d914bd5c1cef768753a90c4a8.tar.bz2
pjctl-4e756def51a8af5d914bd5c1cef768753a90c4a8.zip
Fix check for an invalid avmute target type
-rw-r--r--src/pjctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pjctl.c b/src/pjctl.c
index 23d60f0..8e6b1e5 100644
--- a/src/pjctl.c
+++ b/src/pjctl.c
@@ -485,7 +485,7 @@ static int
avmute(struct pjctl *pjctl, char **argv, int argc)
{
struct queue_command *cmd;
- int type = -1;
+ int type = 0;
int i;
char code;
const char *targets[] = { "video", "audio", "av" };
@@ -500,8 +500,7 @@ avmute(struct pjctl *pjctl, char **argv, int argc)
}
for (i = 0; i < ARRAY_SIZE(targets); ++i) {
- int len = strlen(targets[i]);
- if (strncmp(argv[1], targets[i], len) == 0) {
+ if (strcmp(argv[1], targets[i]) == 0) {
type = i+1;
break;
}