* [PATCH 1/1] ALSA: es1688: Use strcpy() instead of sprintf()
@ 2017-03-13 19:22 Nicolas Iooss
2017-03-20 11:24 ` [alsa-devel] " Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2017-03-13 19:22 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: Nicolas Iooss, linux-kernel
There is no point in using sprintf() without a format string when
strcpy() can perform the same operation.
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
sound/isa/es1688/es1688_lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index e2cf508841b1..81cf26fa28d6 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -742,7 +742,7 @@ int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device)
pcm->private_data = chip;
pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;
- sprintf(pcm->name, snd_es1688_chip_id(chip));
+ strcpy(pcm->name, snd_es1688_chip_id(chip));
chip->pcm = pcm;
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [PATCH 1/1] ALSA: es1688: Use strcpy() instead of sprintf()
2017-03-13 19:22 [PATCH 1/1] ALSA: es1688: Use strcpy() instead of sprintf() Nicolas Iooss
@ 2017-03-20 11:24 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-03-20 11:24 UTC (permalink / raw)
To: Nicolas Iooss; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
On Mon, 13 Mar 2017 20:22:50 +0100,
Nicolas Iooss wrote:
>
> There is no point in using sprintf() without a format string when
> strcpy() can perform the same operation.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Applied, thanks.
Takashi
> ---
> sound/isa/es1688/es1688_lib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
> index e2cf508841b1..81cf26fa28d6 100644
> --- a/sound/isa/es1688/es1688_lib.c
> +++ b/sound/isa/es1688/es1688_lib.c
> @@ -742,7 +742,7 @@ int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device)
>
> pcm->private_data = chip;
> pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX;
> - sprintf(pcm->name, snd_es1688_chip_id(chip));
> + strcpy(pcm->name, snd_es1688_chip_id(chip));
> chip->pcm = pcm;
>
> snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
> --
> 2.12.0
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-20 11:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 19:22 [PATCH 1/1] ALSA: es1688: Use strcpy() instead of sprintf() Nicolas Iooss
2017-03-20 11:24 ` [alsa-devel] " Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).