]> Pileus Git - ~andy/linux/blobdiff - tools/perf/builtin-bench.c
Linux 3.14
[~andy/linux] / tools / perf / builtin-bench.c
index e47f90cc7b98cdde57079975bbd5637f3249ce44..8a987d2527803ff71f10314152162b29d61b486a 100644 (file)
@@ -76,7 +76,7 @@ static struct collection collections[] = {
 
 /* Iterate over all benchmarks within a collection: */
 #define for_each_bench(coll, bench) \
-       for (bench = coll->benchmarks; bench->name; bench++)
+       for (bench = coll->benchmarks; bench && bench->name; bench++)
 
 static void dump_benchmarks(struct collection *coll)
 {