History

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'.

Masahiro Yamada committed 7 years ago

Commit 75889e91 parent a9b72281 file · +3 −3Browse files

Unified · Split

scripts/kconfig/confdata.c+3−3
@@ -363,7 +363,7 @@ load: · 362 unmodified lines
363363 sym = sym_find(line + 2 + strlen(CONFIG_));
364364 if (!sym) {
365365 sym_add_change_count(1);
366− goto setsym;
366+ continue;
367367 }
368368 } else {
369369 sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
@@ -397,7 +397,7 @@ load: · 27 unmodified lines
397397 sym = sym_find(line + strlen(CONFIG_));
398398 if (!sym) {
399399 sym_add_change_count(1);
400− goto setsym;
400+ continue;
401401 }
402402 } else {
403403 sym = sym_lookup(line + strlen(CONFIG_), 0);
@@ -416,7 +416,7 @@ load: · 12 unmodified lines
416416
417417 continue;
418418 }
419−setsym:
419+
420420 if (sym && sym_is_choice_value(sym)) {
421421 struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
422422 switch (sym->def[def].tri) {