]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ALSA: ump: Fix the wrong format specifier
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>
Thu, 14 Nov 2024 07:58:22 +0000 (15:58 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 14 Nov 2024 13:38:40 +0000 (14:38 +0100)
The format specifier of "unsigned int" in snprintf()
should be "%u", not "%d".

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241114075822.41614-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/ump.c

index ab4932dc499f4add27a4f31b5baef4240e175b65..5d4dd207e5ab260b4ff3affaebd28f42ac1c221d 100644 (file)
@@ -387,7 +387,7 @@ int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk,
        fb->info.first_group = first_group;
        fb->info.num_groups = num_groups;
        /* fill the default name, may be overwritten to a better name */
-       snprintf(fb->info.name, sizeof(fb->info.name), "Group %d-%d",
+       snprintf(fb->info.name, sizeof(fb->info.name), "Group %u-%u",
                 first_group + 1, first_group + num_groups);
 
        /* put the entry in the ordered list */