From: Sasha Levin Date: Thu, 20 Dec 2012 19:11:19 +0000 (-0500) Subject: perf script: use ARRAY_SIZE instead of reinventing it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50ca19aed8ad2e264ef6bce6d6d5cb7f8bfae8c9;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git perf script: use ARRAY_SIZE instead of reinventing it Signed-off-by: Sasha Levin Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1356030701-16284-11-git-send-email-sasha.levin@oracle.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index b363e7b292b..3314ef2ec83 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -692,7 +692,7 @@ static int parse_output_fields(const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused) { char *tok; - int i, imax = sizeof(all_output_options) / sizeof(struct output_option); + int i, imax = ARRAY_SIZE(all_output_options); int j; int rc = 0; char *str = strdup(arg);