Skip to contentSkip to conversation

kconfig: constify long_opts

PATCH In review Masahiro Yamada 1 participant 2 messages May 28, 2021 – Jun 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: constify long_opts

getopt_long() does not modify the logopts structure.

---

 scripts/kconfig/conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/conf.c +1 -1
index bfa1ea8f5f98..5d84b44a2a2a 100644
@@ -678,7 +678,7 @@ static void check_conf(struct menu *menu)
 		check_conf(child);
 }
 
-static struct option long_opts[] = {
+static const struct option long_opts[] = {
 	{"help",          no_argument,       NULL,            'h'},
 	{"silent",        no_argument,       NULL,            's'},
 	{"oldaskconfig",  no_argument,       &input_mode_opt, oldaskconfig},
Signature · 1 line
2.27.0
#1 lore raw
Quoted 5 lines · Masahiro Yamada

getopt_long() does not modify the logopts structure.

---

Applied to linux-kbuild.

Quoted 19 lines
 scripts/kconfig/conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/conf.c +1 -2
index bfa1ea8f5f98..5d84b44a2a2a 100644
@@ -678,7 +678,7 @@ static void check_conf(struct menu *menu)
                check_conf(child);
 }
 
-static struct option long_opts[] = {
+static const struct option long_opts[] = {
        {"help",          no_argument,       NULL,            'h'},
        {"silent",        no_argument,       NULL,            's'},
        {"oldaskconfig",  no_argument,       &input_mode_opt, oldaskconfig},
--

2.27.0

Signature · 2 lines
Best Regards
Masahiro Yamada