summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_exe_main.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 23:10:26 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 23:10:26 +0000
commit60400404e23d6bc456071fc5acaf29c7b6bf550a (patch)
treeb5bebffd3c958601033e5224f30c1d7c039cfbc3 /chrome/app/chrome_exe_main.cc
parentf11f0de7f3e245d49f651423907f2c813a84ee6a (diff)
downloadchromium_src-60400404e23d6bc456071fc5acaf29c7b6bf550a.zip
chromium_src-60400404e23d6bc456071fc5acaf29c7b6bf550a.tar.gz
chromium_src-60400404e23d6bc456071fc5acaf29c7b6bf550a.tar.bz2
Coverity: Convert dll_path_ to a std::wstring. This avoids having dll_path_ uninitialized after the object is constructed.
CID=1632 BUG=none TEST=none Review URL: http://codereview.chromium.org/306037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_exe_main.cc')
-rw-r--r--chrome/app/chrome_exe_main.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/app/chrome_exe_main.cc b/chrome/app/chrome_exe_main.cc
index a0899e6..33fc669 100644
--- a/chrome/app/chrome_exe_main.cc
+++ b/chrome/app/chrome_exe_main.cc
@@ -58,10 +58,9 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
dll_full_path = client.GetDLLFullPath();
versionned_path = client.GetDLLPath();
#else
- wchar_t exe_path[MAX_PATH] = {0};
- client_util::GetExecutablePath(exe_path);
+ std::wstring exe_path = client_util::GetExecutablePath();
wchar_t *version;
- if (client_util::GetChromiumVersion(exe_path, L"Software\\Chromium",
+ if (client_util::GetChromiumVersion(exe_path.c_str(), L"Software\\Chromium",
&version)) {
versionned_path = exe_path;
versionned_path.append(version);
@@ -72,7 +71,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
#endif
// If the versionned path exists, we set the current directory to this path.
- if (client_util::FileExists(versionned_path.c_str())) {
+ if (client_util::FileExists(versionned_path)) {
::SetCurrentDirectory(versionned_path.c_str());
}