blob: 981870ed8ad7132ff146a3e3d75e4d7ac715b54f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 9621d0bff2e60b43e329ffa5059ab19f2914ec14 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 11:21:54 +0200
Subject: [PATCH] ucm: fix _alibpref string (add '.' delimiter to the end)
Fixes: 0e4ba2ea ("ucm: add _alibpref to get the private device prefix")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 3c9ea15d..c9b37b68 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -2146,13 +2146,13 @@ static int get_alibcfg(snd_use_case_mgr_t *uc_mgr, char **str)
*/
static int get_alibpref(snd_use_case_mgr_t *uc_mgr, char **str)
{
- const size_t l = 9;
+ const size_t l = 10;
char *s;
s = malloc(l);
if (s == NULL)
return -ENOMEM;
- snprintf(s, l, "_ucm%04X", uc_mgr->ucm_card_number);
+ snprintf(s, l, "_ucm%04X.", uc_mgr->ucm_card_number);
*str = s;
return 0;
}
|