[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1301871655-17038-1-git-send-email-tfransosi@gmail.com>
Date: Sun, 3 Apr 2011 20:00:55 -0300
From: Thiago Farina <tfransosi@...il.com>
To: linux-kernel@...r.kernel.org
Cc: a.p.zijlstra@...llo.nl, acme@...stprotocols.net, paulus@...ba.org,
mingo@...e.hu, fweisbec@...il.com, daahern@...co.co,
imunsie@...ibm.com
Subject: [PATCH 1/1] perf: Use ARRAY_SIZE macro in trace-event-parse.c.
Signed-off-by: Thiago Farina <tfransosi@...il.com>
---
tools/perf/util/trace-event-parse.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 0a7ed5b..7c24247 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -2195,7 +2195,7 @@ static const struct flag flags[] = {
unsigned long long eval_flag(const char *flag)
{
- int i;
+ unsigned int i;
/*
* Some flags in the format files do not get converted.
@@ -2205,7 +2205,7 @@ unsigned long long eval_flag(const char *flag)
if (isdigit(flag[0]))
return strtoull(flag, NULL, 0);
- for (i = 0; i < (int)(sizeof(flags)/sizeof(flags[0])); i++)
+ for (i = 0; i < ARRAY_SIZE(flags); i++)
if (strcmp(flags[i].name, flag) == 0)
return flags[i].value;
--
1.7.3.2.343.g7d43d
--
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