aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Levin <[email protected]>2012-12-20 14:11:20 -0500
committerArnaldo Carvalho de Melo <[email protected]>2013-01-24 16:40:14 -0300
commit53985a7bfa7b947c91f35c6adcdc9cacc6fef07f (patch)
tree9935092a260dd6fff198d98143243ca4ea4523d0
parent531f67bb9ff4069b629762dd5a560e23fc4c5478 (diff)
perf tools: remove redundant checks from _sort__sym_cmp
We already check that sym_l and sum_r are non-NULLs, no need to do it twice. Signed-off-by: Sasha Levin <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/sort.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index cfd1c0feb32d..dbaded90312c 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -143,10 +143,8 @@ static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r,
if (sym_l == sym_r)
return 0;
- if (sym_l)
- ip_l = sym_l->start;
- if (sym_r)
- ip_r = sym_r->start;
+ ip_l = sym_l->start;
+ ip_r = sym_r->start;
return (int64_t)(ip_r - ip_l);
}