mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
ALSA: mips: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to arrays. Only idiomatic code replacement, and no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250710100727.22653-40-tiwai@suse.de
This commit is contained in:
parent
fc52ff69c5
commit
7169b6a676
@ -706,7 +706,7 @@ static int hal2_pcm_create(struct snd_hal2 *hal2)
|
||||
return err;
|
||||
|
||||
pcm->private_data = hal2;
|
||||
strcpy(pcm->name, "SGI HAL2");
|
||||
strscpy(pcm->name, "SGI HAL2");
|
||||
|
||||
/* set operators */
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
|
||||
@ -862,8 +862,8 @@ static int hal2_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
strcpy(card->driver, "SGI HAL2 Audio");
|
||||
strcpy(card->shortname, "SGI HAL2 Audio");
|
||||
strscpy(card->driver, "SGI HAL2 Audio");
|
||||
strscpy(card->shortname, "SGI HAL2 Audio");
|
||||
sprintf(card->longname, "%s irq %i",
|
||||
card->shortname,
|
||||
SGI_HPCDMA_IRQ);
|
||||
|
Loading…
Reference in New Issue
Block a user