diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-07-10 12:06:22 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-07-11 09:53:16 +0200 |
| commit | c9b41682945f3c389bd230aa74bd1409df31b521 (patch) | |
| tree | d34e3c6aa44cae3c6e067799abc49587afeff768 | |
| parent | 7169b6a6763d5a879f42ce1a1aad72b6d611e375 (diff) | |
| download | linux-c9b41682945f3c389bd230aa74bd1409df31b521.tar.gz linux-c9b41682945f3c389bd230aa74bd1409df31b521.zip | |
ALSA: parisc: 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-41-tiwai@suse.de
| -rw-r--r-- | sound/parisc/harmony.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c index db9c296dd688..76dd2210f9ea 100644 --- a/sound/parisc/harmony.c +++ b/sound/parisc/harmony.c @@ -601,7 +601,7 @@ snd_harmony_pcm_init(struct snd_harmony *h) pcm->private_data = h; pcm->info_flags = 0; - strcpy(pcm->name, "harmony"); + strscpy(pcm->name, "harmony"); h->pcm = pcm; h->psubs = NULL; @@ -823,7 +823,7 @@ snd_harmony_mixer_init(struct snd_harmony *h) if (snd_BUG_ON(!h)) return -EINVAL; card = h->card; - strcpy(card->mixername, "Harmony Gain control interface"); + strscpy(card->mixername, "Harmony Gain control interface"); for (idx = 0; idx < HARMONY_CONTROLS; idx++) { err = snd_ctl_add(card, @@ -937,8 +937,8 @@ snd_harmony_probe(struct parisc_device *padev) if (err < 0) goto free_and_ret; - strcpy(card->driver, "harmony"); - strcpy(card->shortname, "Harmony"); + strscpy(card->driver, "harmony"); + strscpy(card->shortname, "Harmony"); sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, h->hpa, h->irq); |
