Index: base/base_paths_mac.mm |
=================================================================== |
--- base/base_paths_mac.mm (revision 107404) |
+++ base/base_paths_mac.mm (working copy) |
@@ -26,14 +26,11 @@ |
// how the app was launched. |
uint32_t executable_length = 0; |
_NSGetExecutablePath(NULL, &executable_length); |
- DCHECK_GE(executable_length, 1u); |
+ DCHECK_GT(executable_length, 1u); |
std::string executable_path; |
- char* executable_path_c = WriteInto(&executable_path, executable_length); |
- int rv = _NSGetExecutablePath(executable_path_c, &executable_length); |
+ int rv = _NSGetExecutablePath(WriteInto(&executable_path, executable_length), |
+ &executable_length); |
DCHECK_EQ(rv, 0); |
- DCHECK(!executable_path.empty()); |
- if ((rv != 0) || (executable_path.empty())) |
- return false; |
*path = FilePath(executable_path); |
return true; |
} |