perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Mon, 14 Dec 2015 15:44:03 +0000 (16:44 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 27 Feb 2016 14:28:44 +0000 (14:28 +0000)
commit d4913cbd05bab685e49c8174896e563b2487d054 upstream.

The issue was pointed out by gcc-6's -Wmisleading-indentation.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: c97cf42219b7 ("perf top: Live TUI Annotation")
Link: http://lkml.kernel.org/r/20151214154403.GB1409@x4
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
tools/perf/util/ui/browsers/annotate.c

index 0575905..6d7e7ca 100644 (file)
@@ -276,11 +276,11 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
                                nd = self->curr_hot;
                        break;
                case K_UNTAB:
                                nd = self->curr_hot;
                        break;
                case K_UNTAB:
-                       if (nd != NULL)
+                       if (nd != NULL) {
                                nd = rb_next(nd);
                                if (nd == NULL)
                                        nd = rb_first(&self->entries);
                                nd = rb_next(nd);
                                if (nd == NULL)
                                        nd = rb_first(&self->entries);
-                       else
+                       else
                                nd = self->curr_hot;
                        break;
                case 'H':
                                nd = self->curr_hot;
                        break;
                case 'H':