]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: jack: Improve string handling in jack_kctl_name_gen
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 25 Jan 2026 15:51:56 +0000 (16:51 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 27 Jan 2026 08:58:37 +0000 (09:58 +0100)
commitbfa514c4613b39e536d4a9dfbcb8eb8e68776343
treee82504f453492b8c03805ef3fde4ef1ba19269cc
parentcc051fbd7f40226cc407558bc97c5099513e8657
ALSA: jack: Improve string handling in jack_kctl_name_gen

If appending " Jack" is not necessary, replace snprintf("%s", ...) with
the faster strscpy().

Additionally, rename 'need_cat' to the clearer 'append_suf', use local
variables for the suffix and its length, remove the confusing comment,
compare strncmp() to 0, and use 'size_t' for the 'size' function
parameter.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260125155159.98720-1-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/ctljack.c