kconfig: remove unneeded setsym label in conf_read_simple()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 30 Nov 2018 09:15:48 +0000 (18:15 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:30:17 +0000 (22:30 +0100)
The two 'goto setsym' statements are reachable only when sym == NULL.

The code below the 'setsym:' label does nothing when sym == NULL
since there is just one if-block guarded by 'if (sym && ...)'.

Hence, 'goto setsym' can be replaced with 'continue'.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/confdata.c

index ac1c57db1918e17282bec552836ddd255ddd9c84..b7171503936a208af6e103d07ad54c2a8d95ce38 100644 (file)
@@ -363,7 +363,7 @@ load:
                                sym = sym_find(line + 2 + strlen(CONFIG_));
                                if (!sym) {
                                        sym_add_change_count(1);
-                                       goto setsym;
+                                       continue;
                                }
                        } else {
                                sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
@@ -397,7 +397,7 @@ load:
                                sym = sym_find(line + strlen(CONFIG_));
                                if (!sym) {
                                        sym_add_change_count(1);
-                                       goto setsym;
+                                       continue;
                                }
                        } else {
                                sym = sym_lookup(line + strlen(CONFIG_), 0);
@@ -416,7 +416,7 @@ load:
 
                        continue;
                }
-setsym:
+
                if (sym && sym_is_choice_value(sym)) {
                        struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
                        switch (sym->def[def].tri) {