mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -tip:perf/core 1/4] perf session: Remove impossible condition check
@ 2011-12-27 15:35 Namhyung Kim
  2011-12-27 15:35 ` [PATCH -tip:perf/core 2/4] perf stat: Introduce get_ratio_color() helper Namhyung Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Namhyung Kim @ 2011-12-27 15:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel

The 'size' cannot be 0 because it was set to 8 on the
above line in case it was 0 and never changed.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 tools/perf/util/session.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index d9318d8a9ba1..1139f3c6dec5 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1004,8 +1004,7 @@ more:
 		}
 	}
 
-	if (size == 0 ||
-	    (skip = perf_session__process_event(self, &event, tool, head)) < 0) {
+	if ((skip = perf_session__process_event(self, &event, tool, head)) < 0) {
 		dump_printf("%#" PRIx64 " [%#x]: skipping unknown header type: %d\n",
 			    head, event.header.size, event.header.type);
 		/*
-- 
1.7.6


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-04 15:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-27 15:35 [PATCH -tip:perf/core 1/4] perf session: Remove impossible condition check Namhyung Kim
2011-12-27 15:35 ` [PATCH -tip:perf/core 2/4] perf stat: Introduce get_ratio_color() helper Namhyung Kim
2012-01-04 15:21   ` [tip:perf/core] " tip-bot for Namhyung Kim
2011-12-27 15:35 ` [PATCH -tip:perf/core 3/4] perf top: Fix a memory leak Namhyung Kim
2012-01-04 15:21   ` [tip:perf/core] " tip-bot for Namhyung Kim
2011-12-27 15:35 ` [PATCH -tip:perf/core 4/4] perf script: Kill script_spec__delete Namhyung Kim
2012-01-04 15:22   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-01-04 15:20 ` [tip:perf/core] perf session: Remove impossible condition check tip-bot for Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome