Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1462974

[PATCH] perf hists browser: remove superfluous null check on map

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] perf hists browser: remove superfluous null check on map
Date 2016-08-15 18:30 +0200
Message-ID <s6sVY-7S0-25@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

map is being already checked if it is null at the start of
do_zoom_dso, so the second subsequent check is superfluous
and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 tools/perf/ui/browsers/hists.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 13d4143..8d72939 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2418,8 +2418,6 @@ do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
 		browser->hists->dso_filter = NULL;
 		ui_helpline__pop();
 	} else {
-		if (map == NULL)
-			return 0;
 		ui_helpline__fpush("To zoom out press ESC or ENTER + \"Zoom out of %s DSO\"",
 				   __map__is_kernel(map) ? "the Kernel" : map->dso->short_name);
 		browser->hists->dso_filter = map->dso;
-- 
2.8.1

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] perf hists browser: remove superfluous null check on map Colin King <colin.king@canonical.com> - 2016-08-15 18:30 +0200
  Re: [PATCH] perf hists browser: remove superfluous null check on map Namhyung Kim <namhyung@kernel.org> - 2016-08-16 17:40 +0200
  [tip:perf/core] perf hists browser: Remove superfluous null check  on map tip-bot for Colin Ian King <tipbot@zytor.com> - 2016-08-24 11:30 +0200

csiph-web