Skip to contentSkip to conversation

perf symbols: Remove needless goto

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 2, 2018 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  857140e81690748ce9a0a7ae7ed91cddb254f51a
Gitweb:     https://git.kernel.org/tip/857140e81690748ce9a0a7ae7ed91cddb254f51a
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Fri, 27 Apr 2018 10:53:14 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 27 Apr 2018 10:53:14 -0300

perf symbols: Remove needless goto

We can plain use the an else to the if block that is right after that goto, so simplify it.

---
 tools/perf/util/symbol-elf.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
tools/perf/util/symbol-elf.c +2 -6
index 5fd81c19eebf..0b230f1a31c4 100644
@@ -1069,12 +1069,8 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
 				dso__set_loaded(curr_dso);
 			} else
 				curr_dso = curr_map->dso;
-
-			goto new_symbol;
-		}
-
-		if ((used_opd && runtime_ss->adjust_symbols)
-				|| (!used_opd && syms_ss->adjust_symbols)) {
+		} else if ((used_opd && runtime_ss->adjust_symbols) ||
+			   (!used_opd && syms_ss->adjust_symbols)) {
 			pr_debug4("%s: adjusting symbol: st_value: %#" PRIx64 " "
 				  "sh_addr: %#" PRIx64 " sh_offset: %#" PRIx64 "\n", __func__,
 				  (u64)sym.st_value, (u64)shdr.sh_addr,