Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75889e9b authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kconfig: remove unneeded setsym label in conf_read_simple()



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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent a9b72284
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -363,7 +363,7 @@ int conf_read_simple(const char *name, int def)
				sym = sym_find(line + 2 + strlen(CONFIG_));
				sym = sym_find(line + 2 + strlen(CONFIG_));
				if (!sym) {
				if (!sym) {
					sym_add_change_count(1);
					sym_add_change_count(1);
					goto setsym;
					continue;
				}
				}
			} else {
			} else {
				sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
				sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
@@ -397,7 +397,7 @@ int conf_read_simple(const char *name, int def)
				sym = sym_find(line + strlen(CONFIG_));
				sym = sym_find(line + strlen(CONFIG_));
				if (!sym) {
				if (!sym) {
					sym_add_change_count(1);
					sym_add_change_count(1);
					goto setsym;
					continue;
				}
				}
			} else {
			} else {
				sym = sym_lookup(line + strlen(CONFIG_), 0);
				sym = sym_lookup(line + strlen(CONFIG_), 0);
@@ -416,7 +416,7 @@ int conf_read_simple(const char *name, int def)


			continue;
			continue;
		}
		}
setsym:

		if (sym && sym_is_choice_value(sym)) {
		if (sym && sym_is_choice_value(sym)) {
			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
			switch (sym->def[def].tri) {
			switch (sym->def[def].tri) {