Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: gadget: u_audio: Use the 2-argument version of strscpy()

In order to be consistent with other strscpy() usage in this file and less
verbose, use the new 2-argument version of strscpy() which computes
auto-magically the size of the destination.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e7fd0ec5a8b37799271c6d74c325cfb980d44181.1711176701.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Christophe JAILLET and committed by
Greg Kroah-Hartman
39c34568 16fac242

+3 -3
+3 -3
drivers/usb/gadget/function/u_audio.c
··· 1243 1243 if (err < 0) 1244 1244 goto snd_fail; 1245 1245 1246 - strscpy(pcm->name, pcm_name, sizeof(pcm->name)); 1246 + strscpy(pcm->name, pcm_name); 1247 1247 pcm->private_data = uac; 1248 1248 uac->pcm = pcm; 1249 1249 ··· 1386 1386 prm->snd_kctl_rate = kctl; 1387 1387 } 1388 1388 1389 - strscpy(card->driver, card_name, sizeof(card->driver)); 1390 - strscpy(card->shortname, card_name, sizeof(card->shortname)); 1389 + strscpy(card->driver, card_name); 1390 + strscpy(card->shortname, card_name); 1391 1391 sprintf(card->longname, "%s %i", card_name, card->dev->id); 1392 1392 1393 1393 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,