[PATCH perf 2/4] perf top: Fix behaviour of Shift-Tab in annotated view with nothing focussed

From: Ben Hutchings
Date: Tue Jan 19 2016 - 16:33:24 EST


gcc 6 catches a case of missing braces:

ui/browsers/annotate.c: In function 'annotate_browser__run':
ui/browsers/annotate.c:760:5: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
if (nd == NULL)
^~

ui/browsers/annotate.c:758:4: note: ...this 'if' clause, but it is not
if (nd != NULL)
^~

Fixes: c97cf42219b7 ("perf top: Live TUI Annotation")
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
tools/perf/ui/browsers/annotate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index d4d7cc2..718bd46 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -755,11 +755,11 @@ static int annotate_browser__run(struct annotate_browser *browser,
nd = browser->curr_hot;
break;
case K_UNTAB:
- if (nd != NULL)
+ if (nd != NULL) {
nd = rb_next(nd);
if (nd == NULL)
nd = rb_first(&browser->entries);
- else
+ } else
nd = browser->curr_hot;
break;
case K_F1:

Attachment: signature.asc
Description: Digital signature