Skip to content

Commit

Permalink
perf tools: remove redundant checks from _sort__sym_cmp
Browse files Browse the repository at this point in the history
We already check that sym_l and sum_r are non-NULLs, no need to do it
twice.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1356030701-16284-12-git-send-email-sasha.levin@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Sasha Levin authored and Arnaldo Carvalho de Melo committed Jan 24, 2013
1 parent 531f67b commit 53985a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/perf/util/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 53985a7

Please sign in to comment.