]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: macro - fix the error message, print id
authorJaroslav Kysela <perex@perex.cz>
Tue, 17 May 2022 16:19:44 +0000 (18:19 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 17 May 2022 16:19:44 +0000 (18:19 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/parser.c

index 65ebc179ffee385060b6766f3a713223c2476ff6..9b191b666d22f57d7df629bdb587f66d0458ee71 100644 (file)
@@ -484,7 +484,10 @@ static int evaluate_macro(snd_use_case_mgr_t *uc_mgr,
        snd_config_for_each(i, next, d) {
                n = snd_config_iterator_entry(i);
                if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
-                       uc_error("compound type expected for DefineMacro");
+                       const char *id;
+                       if (snd_config_get_id(n, &id))
+                               id = "";
+                       uc_error("compound type expected for Macro.%s", id);
                        return -EINVAL;
                }
                snd_config_for_each(i2, next2, n) {