Skip to content

Commit b522a8b

Browse files
tobluxtiwai
authored andcommitted
ALSA: n64: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: KSPP#88 Signed-off-by: Thorsten Blum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent e43a93c commit b522a8b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sound/mips/snd-n64.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/module.h>
1414
#include <linux/platform_device.h>
1515
#include <linux/spinlock.h>
16+
#include <linux/string.h>
1617

1718
#include <sound/control.h>
1819
#include <sound/core.h>
@@ -327,14 +328,14 @@ static int __init n64audio_probe(struct platform_device *pdev)
327328
goto fail_dma_alloc;
328329

329330
pcm->private_data = priv;
330-
strcpy(pcm->name, "N64 Audio");
331+
strscpy(pcm->name, "N64 Audio");
331332

332333
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &n64audio_pcm_ops);
333334
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_VMALLOC, card->dev, 0, 0);
334335

335-
strcpy(card->driver, "N64 Audio");
336-
strcpy(card->shortname, "N64 Audio");
337-
strcpy(card->longname, "N64 Audio");
336+
strscpy(card->driver, "N64 Audio");
337+
strscpy(card->shortname, "N64 Audio");
338+
strscpy(card->longname, "N64 Audio");
338339

339340
irq = platform_get_irq(pdev, 0);
340341
if (irq < 0) {

0 commit comments

Comments
 (0)