From: Jaroslav Kysela Date: Wed, 3 Feb 2021 10:55:53 +0000 (+0100) Subject: ucm: fix two error messages X-Git-Tag: v1.2.5~108 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=0d232d714a5f9b8783f481dbb24c9f07922b6760;p=alsa-lib.git ucm: fix two error messages - add missing argument to error msg in if_eval_regex_match() - print correct error value in uc_mgr_config_load_file() Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/parser.c b/src/ucm/parser.c index c8bee1f2..a5be791d 100644 --- a/src/ucm/parser.c +++ b/src/ucm/parser.c @@ -92,7 +92,7 @@ int uc_mgr_config_load_file(snd_use_case_mgr_t *uc_mgr, file); err = uc_mgr_config_load(uc_mgr->conf_format, filename, cfg); if (err < 0) { - uc_error("error: failed to open file %s : %d", filename, -errno); + uc_error("error: failed to open file %s: %d", filename, err); return err; } return 0; diff --git a/src/ucm/ucm_cond.c b/src/ucm/ucm_cond.c index 3ca3096e..cf6da6fd 100644 --- a/src/ucm/ucm_cond.c +++ b/src/ucm/ucm_cond.c @@ -162,7 +162,7 @@ static int if_eval_regex_match(snd_use_case_mgr_t *uc_mgr, snd_config_t *eval) err = regcomp(&re, s, options); free(s); if (err) { - uc_error("Regex '%s' compilation failed (code %d)", err); + uc_error("Regex '%s' compilation failed (code %d)", s, err); return -EINVAL; }