Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: base/environment_unittest.cc

Issue 3186017: Don't use const char kFoo[] in the stack place. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/environment_unittest.cc
diff --git a/base/environment_unittest.cc b/base/environment_unittest.cc
index 3d7ab3cc44b05191556459f4b630e54ac5b4f3a7..5081459ce9b47f053a2222d6cfbd98c1602f16ca 100644
--- a/base/environment_unittest.cc
+++ b/base/environment_unittest.cc
@@ -26,8 +26,8 @@ TEST_F(EnvironmentTest, HasVar) {
TEST_F(EnvironmentTest, SetVar) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- const char kFooUpper[] = "FOO";
- const char kFooLower[] = "foo";
+ const char* kFooUpper = "FOO";
+ const char* kFooLower = "foo";
EXPECT_TRUE(env->SetVar(kFooUpper, kFooLower));
// Now verify that the environment has the new variable.
@@ -41,8 +41,8 @@ TEST_F(EnvironmentTest, SetVar) {
TEST_F(EnvironmentTest, UnSetVar) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- const char kFooUpper[] = "FOO";
- const char kFooLower[] = "foo";
+ const char* kFooUpper = "FOO";
+ const char* kFooLower = "foo";
// First set some environment variable.
EXPECT_TRUE(env->SetVar(kFooUpper, kFooLower));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698