Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
[cascardo/linux.git] / tools / perf / builtin-top.c
index 70f1075..676b4fb 100644 (file)
@@ -515,7 +515,9 @@ static void handle_keypress(struct perf_session *session, int c)
                        break;
                case 'E':
                        if (top.evlist->nr_entries > 1) {
-                               int counter;
+                               /* Select 0 as the default event: */
+                               int counter = 0;
+
                                fprintf(stderr, "\nAvailable events:");
 
                                list_for_each_entry(top.sym_evsel, &top.evlist->entries, node)