ucm: set active_verb when set_verb was successful
PATCH 1/1 ucm: set active_verb when set_verb was successful
From: Noé Rubinstein <[email protected]>
This seems to be a bug: execute_sequence returns zero on success, therefore the current code changes the active_verb iff execute_sequence failed.
Signed-off-by Noé Rubinstein <[email protected]>
src/ucm/main.c +1 -1
@@ -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; }
Signature · 6 lines
1.9.2 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Wed, 4 Jun 2014 18:52:25 +0200,
Quoted 6 lines · [email protected] wrote:
From: Noé Rubinstein <[email protected]>
This seems to be a bug:
execute_sequencereturns zero on success, therefore the current code changes theactive_verbiffexecute_sequencefailed.
"err >= 0" means "!(err < 0)", that is, if it's not an error. So the current code isn't wrong.
Takashi
Quoted 19 lines
Signed-off-by Noé Rubinstein <[email protected]>src/ucm/main.c +1
-1@@ -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; }Signature · 1 line
1.9.2
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel