summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-05 10:49:24 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-05 10:51:59 +0100
commit5542125f4c7b8cbb5643b8e61ffe5fc4f3250dc7 (patch)
tree2d1a7eef4e139c0258dc02dbd032ebfa40e5b6ec
parent2dd8a09f37ad898512fed366d312386dcf4f83cd (diff)
downloadpjctl-5542125f4c7b8cbb5643b8e61ffe5fc4f3250dc7.tar.gz
pjctl-5542125f4c7b8cbb5643b8e61ffe5fc4f3250dc7.tar.bz2
pjctl-5542125f4c7b8cbb5643b8e61ffe5fc4f3250dc7.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;
}