[tip:perf/core] perf tools: remove redundant checks from _sort__sym_cmp

From: tip-bot for Sasha Levin
Date: Fri Jan 25 2013 - 06:18:06 EST


Commit-ID: 53985a7bfa7b947c91f35c6adcdc9cacc6fef07f
Gitweb: http://git.kernel.org/tip/53985a7bfa7b947c91f35c6adcdc9cacc6fef07f
Author: Sasha Levin <sasha.levin@xxxxxxxxxx>
AuthorDate: Thu, 20 Dec 2012 14:11:20 -0500
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Thu, 24 Jan 2013 16:40:14 -0300

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 <sasha.levin@xxxxxxxxxx>
Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1356030701-16284-12-git-send-email-sasha.levin@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/sort.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/