2009-12-18 18:34:13

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: [PATCH 1/1] perf diff: Fix usage array, it must end with a NULL entry

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

Fixing this:

[acme@doppio linux-2.6-tip]$ perf diff --hell
Error: unknown option `hell'

usage: perf diff [<options>] [old_file] [new_file]
Segmentation fault
[acme@doppio linux-2.6-tip]$

Also go over the other such arrays to check if they all were OK, they
are, but there were some minor changes to do like making one static and
renaming another to match the command it refers to.

Cc: Frédéric Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/builtin-diff.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 4d33b55..5cc5dcd 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -191,6 +191,7 @@ out_delete:

static const char *const diff_usage[] = {
"perf diff [<options>] [old_file] [new_file]",
+ NULL,
};

static const struct option options[] = {
--
1.6.2.5