Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sound/aoa/codecs/onyx.c: use static const for texts
@ 2014-05-27  7:12 Fabian Frederick
  2014-05-27 10:01 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-27  7:12 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai, Johannes Berg

'texts' is only used as source in strcpy

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiway@suse.de>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
This is untested.

 sound/aoa/codecs/onyx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index f01bffb..401107b 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -241,7 +241,7 @@ static struct snd_kcontrol_new inputgain_control = {
 static int onyx_snd_capture_source_info(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_info *uinfo)
 {
-	static char *texts[] = { "Line-In", "Microphone" };
+	static const char * const texts[] = { "Line-In", "Microphone" };
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] sound/aoa/codecs/onyx.c: use static const for texts
  2014-05-27  7:12 [PATCH 1/1] sound/aoa/codecs/onyx.c: use static const for texts Fabian Frederick
@ 2014-05-27 10:01 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2014-05-27 10:01 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: alsa-devel, Johannes Berg

At Tue, 27 May 2014 09:12:18 +0200,
Fabian Frederick wrote:
> 
> 'texts' is only used as source in strcpy
> 
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiway@suse.de>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Thanks, applied.


Takashi

> ---
> This is untested.
> 
>  sound/aoa/codecs/onyx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
> index f01bffb..401107b 100644
> --- a/sound/aoa/codecs/onyx.c
> +++ b/sound/aoa/codecs/onyx.c
> @@ -241,7 +241,7 @@ static struct snd_kcontrol_new inputgain_control = {
>  static int onyx_snd_capture_source_info(struct snd_kcontrol *kcontrol,
>  	struct snd_ctl_elem_info *uinfo)
>  {
> -	static char *texts[] = { "Line-In", "Microphone" };
> +	static const char * const texts[] = { "Line-In", "Microphone" };
>  
>  	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
>  	uinfo->count = 1;
> -- 
> 1.9.1
> 
> _______________________________________________
> 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:[~2014-05-27 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27  7:12 [PATCH 1/1] sound/aoa/codecs/onyx.c: use static const for texts Fabian Frederick
2014-05-27 10:01 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox