mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-20 05:33:44 -04:00
ucm: add show_err parameter to uc_mgr_get_variable
Add bool show_err parameter to uc_mgr_get_variable() to control whether an error message is displayed when a variable is not defined. This centralizes error reporting and eliminates redundant error messages in callers. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
a74521f371
commit
d8ca4a7cc4
5 changed files with 22 additions and 29 deletions
|
|
@ -527,7 +527,7 @@ static int evaluate_macro1(snd_use_case_mgr_t *uc_mgr,
|
|||
if (err < 0)
|
||||
goto __err_path;
|
||||
snprintf(name, sizeof(name), "__%s", id);
|
||||
if (uc_mgr_get_variable(uc_mgr, name)) {
|
||||
if (uc_mgr_get_variable(uc_mgr, name, false)) {
|
||||
snd_error(UCM, "Macro argument '%s' is already defined", name);
|
||||
goto __err_path;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue