mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:45:41 +01:00
alsactl/init: Fix CTL{value} assigning - make it relevant to documentation
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
658cebdc05
commit
d01bbbd706
1 changed files with 3 additions and 4 deletions
|
@ -396,7 +396,7 @@ static int set_ctl_value(struct space *space, const char *value, int all)
|
|||
}
|
||||
val = snd_ctl_convert_from_dB(snd_hctl_ctl(space->ctl_handle), space->ctl_id, val, &lval, -1);
|
||||
if (val < 0) {
|
||||
Perror(space, "unable to convert dB value '%s' to internal integer range", value);
|
||||
dbg("unable to convert dB value '%s' to internal integer range", value);
|
||||
return val;
|
||||
}
|
||||
snd_ctl_elem_value_set_integer(space->ctl_value, idx, lval);
|
||||
|
@ -1313,10 +1313,9 @@ static int parse_line(struct space *space, char *line, size_t linesize)
|
|||
}
|
||||
snprintf(string, sizeof(string), "%i", err);
|
||||
space->program_result = strdup(string);
|
||||
if (err < 0 || space->program_result == NULL) {
|
||||
err = 0;
|
||||
err = 0;
|
||||
if (space->program_result == NULL)
|
||||
break;
|
||||
}
|
||||
} else if (op == KEY_OP_MATCH || op == KEY_OP_NOMATCH) {
|
||||
dbg("ctl match: '%s' '%s'", value, attr);
|
||||
temp = (char *)elemid_get(space, attr);
|
||||
|
|
Loading…
Reference in a new issue