projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
121f46b
)
ALSA: info: More constifications
author
Takashi Iwai
<tiwai@suse.de>
Sun, 5 Jan 2020 14:47:53 +0000
(15:47 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Sun, 5 Jan 2020 15:14:57 +0000
(16:14 +0100)
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 <tiwai@suse.de>
sound/core/info.c
patch
|
blob
|
history
diff --git
a/sound/core/info.c
b/sound/core/info.c
index e051a029ccfb44172737c4ade606929a17b70ffa..6801d8160866885eeab1dcdbfba396d9aca5ed80 100644
(file)
--- a/
sound/core/info.c
+++ b/
sound/core/info.c
@@
-20,7
+20,7
@@
int snd_info_check_reserved_words(const char *str)
{
- static c
har *
reserved[] =
+ static c
onst char * const
reserved[] =
{
"version",
"meminfo",
@@
-35,7
+35,7
@@
int snd_info_check_reserved_words(const char *str)
"seq",
NULL
};
- c
har *
*xstr = reserved;
+ c
onst char * const
*xstr = reserved;
while (*xstr) {
if (!strcmp(*xstr, str))