Skip to content

Commit ed990c0

Browse files
committed
ALSA: ump: Shut up truncated string warning
The recent change for the legacy substream name update brought a compile warning for some compilers due to the nature of snprintf(). Use scnprintf() to shut up the warning since the truncation is intentional. Fixes: e29e504 ("ALSA: ump: Indicate the inactive group in legacy substream names") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9b5f8ee commit ed990c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/core/ump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,9 +1262,9 @@ static void fill_substream_names(struct snd_ump_endpoint *ump,
12621262
name = ump->groups[idx].name;
12631263
if (!*name)
12641264
name = ump->info.name;
1265-
snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
1266-
idx + 1, name,
1267-
ump->groups[idx].active ? "" : " [Inactive]");
1265+
scnprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
1266+
idx + 1, name,
1267+
ump->groups[idx].active ? "" : " [Inactive]");
12681268
}
12691269
}
12701270

0 commit comments

Comments
 (0)