diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index b363e7b292b26fa2ff41bd5a86977ec8a7f8e3c4..3314ef2ec83edd067ca81c148faf550b96c9dd77 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);