Page MenuHomeFreeBSD

D45973.id141459.diff
No OneTemporary

D45973.id141459.diff

diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c
--- a/usr.sbin/mixer/mixer.c
+++ b/usr.sbin/mixer/mixer.c
@@ -426,11 +426,14 @@
m = d->parent_mixer;
cp = mixer_get_ctl(m->dev, C_MUT);
val = p;
- if (strncmp(val, "off", strlen(val)) == 0 || *val == '0')
+ if (strncmp(val, "off", strlen(val)) == 0 ||
+ strncmp(val, "0", strlen(val)) == 0)
opt = MIX_UNMUTE;
- else if (strncmp(val, "on", strlen(val)) == 0 || *val == '1')
+ else if (strncmp(val, "on", strlen(val)) == 0 ||
+ strncmp(val, "1", strlen(val)) == 0)
opt = MIX_MUTE;
- else if (strncmp(val, "toggle", strlen(val)) == 0 || *val == '^')
+ else if (strncmp(val, "toggle", strlen(val)) == 0 ||
+ strncmp(val, "^", strlen(val)) == 0)
opt = MIX_TOGGLEMUTE;
else {
warnx("%s: no such modifier", val);
@@ -459,13 +462,17 @@
m = d->parent_mixer;
cp = mixer_get_ctl(m->dev, C_SRC);
val = p;
- if (strncmp(val, "add", strlen(val)) == 0 || *val == '+')
+ if (strncmp(val, "add", strlen(val)) == 0 ||
+ strncmp(val, "+", strlen(val)) == 0)
opt = MIX_ADDRECSRC;
- else if (strncmp(val, "remove", strlen(val)) == 0 || *val == '-')
+ else if (strncmp(val, "remove", strlen(val)) == 0 ||
+ strncmp(val, "-", strlen(val)) == 0)
opt = MIX_REMOVERECSRC;
- else if (strncmp(val, "set", strlen(val)) == 0 || *val == '=')
+ else if (strncmp(val, "set", strlen(val)) == 0 ||
+ strncmp(val, "=", strlen(val)) == 0)
opt = MIX_SETRECSRC;
- else if (strncmp(val, "toggle", strlen(val)) == 0 || *val == '^')
+ else if (strncmp(val, "toggle", strlen(val)) == 0 ||
+ strncmp(val, "^", strlen(val)) == 0)
opt = MIX_TOGGLERECSRC;
else {
warnx("%s: no such modifier", val);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 9:19 PM (19 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14746142
Default Alt Text
D45973.id141459.diff (1 KB)

Event Timeline