mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-19 20:40:50 -05:00
ALSA: echoaudio: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250709124655.1195-1-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
3263a554f3
commit
907e01b3ce
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
MODULE_AUTHOR("Giuliano Pochini <pochini@shiny.it>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
@@ -916,7 +917,7 @@ static int snd_echo_new_pcm(struct echoaudio *chip)
|
||||
return err;
|
||||
pcm->private_data = chip;
|
||||
chip->analog_pcm = pcm;
|
||||
strcpy(pcm->name, chip->card->shortname);
|
||||
strscpy(pcm->name, chip->card->shortname);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &analog_playback_ops);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &analog_capture_ops);
|
||||
snd_echo_preallocate_pages(pcm, &chip->pci->dev);
|
||||
@@ -929,7 +930,7 @@ static int snd_echo_new_pcm(struct echoaudio *chip)
|
||||
return err;
|
||||
pcm->private_data = chip;
|
||||
chip->digital_pcm = pcm;
|
||||
strcpy(pcm->name, chip->card->shortname);
|
||||
strscpy(pcm->name, chip->card->shortname);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &digital_capture_ops);
|
||||
snd_echo_preallocate_pages(pcm, &chip->pci->dev);
|
||||
#endif /* ECHOCARD_HAS_DIGITAL_IO */
|
||||
@@ -949,7 +950,7 @@ static int snd_echo_new_pcm(struct echoaudio *chip)
|
||||
return err;
|
||||
pcm->private_data = chip;
|
||||
chip->analog_pcm = pcm;
|
||||
strcpy(pcm->name, chip->card->shortname);
|
||||
strscpy(pcm->name, chip->card->shortname);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &analog_playback_ops);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &analog_capture_ops);
|
||||
snd_echo_preallocate_pages(pcm, &chip->pci->dev);
|
||||
@@ -963,7 +964,7 @@ static int snd_echo_new_pcm(struct echoaudio *chip)
|
||||
return err;
|
||||
pcm->private_data = chip;
|
||||
chip->digital_pcm = pcm;
|
||||
strcpy(pcm->name, chip->card->shortname);
|
||||
strscpy(pcm->name, chip->card->shortname);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &digital_playback_ops);
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &digital_capture_ops);
|
||||
snd_echo_preallocate_pages(pcm, &chip->pci->dev);
|
||||
@@ -1985,8 +1986,8 @@ static int __snd_echo_probe(struct pci_dev *pci,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
strcpy(card->driver, "Echo_" ECHOCARD_NAME);
|
||||
strcpy(card->shortname, chip->card_name);
|
||||
strscpy(card->driver, "Echo_" ECHOCARD_NAME);
|
||||
strscpy(card->shortname, chip->card_name);
|
||||
|
||||
dsp = "56301";
|
||||
if (pci_id->device == 0x3410)
|
||||
|
||||
Reference in New Issue
Block a user