lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-50ca19aed8ad2e264ef6bce6d6d5cb7f8bfae8c9@git.kernel.org>
Date:	Fri, 25 Jan 2013 03:20:12 -0800
From:	tip-bot for Sasha Levin <sasha.levin@...cle.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
	mingo@...hat.com, sasha.levin@...cle.com, hpa@...or.com,
	mingo@...nel.org, a.p.zijlstra@...llo.nl, tglx@...utronix.de
Subject: [tip:perf/core] perf script:
  use ARRAY_SIZE instead of reinventing it

Commit-ID:  50ca19aed8ad2e264ef6bce6d6d5cb7f8bfae8c9
Gitweb:     http://git.kernel.org/tip/50ca19aed8ad2e264ef6bce6d6d5cb7f8bfae8c9
Author:     Sasha Levin <sasha.levin@...cle.com>
AuthorDate: Thu, 20 Dec 2012 14:11:19 -0500
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 24 Jan 2013 16:40:15 -0300

perf script: use ARRAY_SIZE instead of reinventing it

Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1356030701-16284-11-git-send-email-sasha.levin@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-script.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index b363e7b..3314ef2 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ