Skip to contentSkip to conversation

perf top: Add missing initialization to zero

PATCH New Arnaldo Carvalho de Melo 1 participant 1 message Mar 16, 2010 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf top: Add missing initialization to zero

From: Arnaldo Carvalho de Melo <[email protected]>

The dso_short_width has to start as zero, as we're calculating the maximum short DSO name length, somehow I missed this one.

Cc Frédéric Weisbecker <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 tools/perf/builtin-top.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/builtin-top.c +1 -1
index 057f8b6..887ebbf 100644
@@ -464,7 +464,7 @@ static void print_sym_table(void)
 	struct sym_entry *syme, *n;
 	struct rb_root tmp = RB_ROOT;
 	struct rb_node *nd;
-	int sym_width = 0, dso_width = 0, dso_short_width;
+	int sym_width = 0, dso_width = 0, dso_short_width = 0;
 	const int win_width = winsize.ws_col - 1;
 
 	samples = userspace_samples = exact_samples = 0;
Signature · 1 line
1.6.2.5