From 0d232d714a5f9b8783f481dbb24c9f07922b6760 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 3 Feb 2021 11:55:53 +0100 Subject: [PATCH] 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 --- src/ucm/parser.c | 2 +- src/ucm/ucm_cond.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.11.0