lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf tools: remove redundant checks from _sort__sym_cmp
Date
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>
---
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);
}
--
1.8.0


\
 
 \ /
  Last update: 2012-12-21 01:01    [W:0.183 / U:1.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site