From: Takashi Iwai Date: Sun, 5 Jan 2020 14:47:53 +0000 (+0100) Subject: ALSA: info: More constifications X-Git-Tag: v5.15~4528^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51d7847a2d81ac6779b62fabd722b49b3b664de9;p=platform%2Fkernel%2Flinux-starfive.git ALSA: info: More constifications Apply const prefix to the string array and its callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-39-tiwai@suse.de Signed-off-by: Takashi Iwai --- diff --git a/sound/core/info.c b/sound/core/info.c index e051a02..6801d81 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -20,7 +20,7 @@ int snd_info_check_reserved_words(const char *str) { - static char *reserved[] = + static const char * const reserved[] = { "version", "meminfo", @@ -35,7 +35,7 @@ int snd_info_check_reserved_words(const char *str) "seq", NULL }; - char **xstr = reserved; + const char * const *xstr = reserved; while (*xstr) { if (!strcmp(*xstr, str))