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

Unified Diff: net/socket/ssl_test_util.cc

Issue 209027: oldpath is wchar_t, so use arraysize, not sizeof. (Closed)
Patch Set: Created 11 years, 3 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: net/socket/ssl_test_util.cc
diff --git a/net/socket/ssl_test_util.cc b/net/socket/ssl_test_util.cc
index 7e73f1e800189188b3b33d40b1fc3c8161397139..763031f414003635bd8ceb8522f8e93c67b0f5e1 100644
--- a/net/socket/ssl_test_util.cc
+++ b/net/socket/ssl_test_util.cc
@@ -177,7 +177,7 @@ void AppendToPythonPath(const FilePath& dir) {
const wchar_t kPythonPath[] = L"PYTHONPATH";
// FIXME(dkegel): handle longer PYTHONPATH variables
wchar_t oldpath[4096];
- if (GetEnvironmentVariable(kPythonPath, oldpath, sizeof(oldpath)) == 0) {
+ if (GetEnvironmentVariable(kPythonPath, oldpath, arraysize(oldpath)) == 0) {
SetEnvironmentVariableW(kPythonPath, dir.value().c_str());
} else if (!wcsstr(oldpath, dir.value().c_str())) {
std::wstring newpath(oldpath);
« 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