[alsa-devel] [PATCH - ucm 1/1] ucm: set active_verb when set_verb was successful
Takashi Iwai
tiwai at suse.de
Thu Jun 5 08:38:01 CEST 2014
At Wed, 4 Jun 2014 18:52:25 +0200,
nrubinstein at aldebaran-robotics.com wrote:
>
> From: Noé Rubinstein <nrubinstein at aldebaran-robotics.com>
>
> This seems to be a bug: execute_sequence returns zero on success,
> therefore the current code changes the active_verb iff execute_sequence
> failed.
"err >= 0" means "!(err < 0)", that is, if it's not an error.
So the current code isn't wrong.
Takashi
>
> Signed-off-by: Noé Rubinstein <nrubinstein at aldebaran-robotics.com>
>
> diff --git a/src/ucm/main.c b/src/ucm/main.c
> index 0494728..3c0d7e4 100644
> --- a/src/ucm/main.c
> +++ b/src/ucm/main.c
> @@ -623,7 +623,7 @@ static int set_verb(snd_use_case_mgr_t *uc_mgr,
> &verb->value_list,
> &uc_mgr->value_list,
> NULL);
> - if (enable && err >= 0)
> + if (enable && err == 0)
> uc_mgr->active_verb = verb;
> return err;
> }
> --
> 1.9.2
>
More information about the Alsa-devel
mailing list