[PATCH 25/25] tools/perf/util: Use static const char arrays

From: Joe Perches
Date: Mon Sep 13 2010 - 15:48:53 EST


Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
tools/perf/util/ui/setup.c | 3 ++-
tools/perf/util/ui/util.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/ui/setup.c b/tools/perf/util/ui/setup.c
index 6620850..9ff3ead 100644
--- a/tools/perf/util/ui/setup.c
+++ b/tools/perf/util/ui/setup.c
@@ -34,7 +34,8 @@ void exit_browser(bool wait_for_ok)
{
if (use_browser > 0) {
if (wait_for_ok) {
- char title[] = "Fatal Error", ok[] = "Ok";
+ static const char title[] = "Fatal Error";
+ static const char ok[] = "Ok";
newtWinMessage(title, ok, ui_helpline__last_msg);
}
newtFinished();
diff --git a/tools/perf/util/ui/util.c b/tools/perf/util/ui/util.c
index 9706d9d..fe2742e 100644
--- a/tools/perf/util/ui/util.c
+++ b/tools/perf/util/ui/util.c
@@ -107,6 +107,7 @@ out_destroy_form:
bool ui__dialog_yesno(const char *msg)
{
/* newtWinChoice should really be accepting const char pointers... */
- char yes[] = "Yes", no[] = "No";
+ static const char yes[] = "Yes";
+ static const char no[] = "No";
return newtWinChoice(NULL, yes, no, (char *)msg) == 1;
}
--
1.7.3.rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/