From: Sasha Levin Date: Thu, 20 Dec 2012 19:11:20 +0000 (-0500) Subject: perf tools: remove redundant checks from _sort__sym_cmp X-Git-Tag: v3.9-rc1~173^2~13^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53985a7bfa7b947c91f35c6adcdc9cacc6fef07f;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Acked-by: Namhyung Kim Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1356030701-16284-12-git-send-email-sasha.levin@oracle.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index cfd1c0f..dbaded9 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); }