diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-24 17:44:39 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-24 17:44:39 +0000 |
commit | c145cbdd012b997265fe8cea6536cc5db759de50 (patch) | |
tree | 0d9d616826328114372f6a694a08c45fae40e0b4 /base/process_util_posix.cc | |
parent | 9769a5a5130f989b68c613b67a0b13a269f74650 (diff) | |
download | chromium_src-c145cbdd012b997265fe8cea6536cc5db759de50.zip chromium_src-c145cbdd012b997265fe8cea6536cc5db759de50.tar.gz chromium_src-c145cbdd012b997265fe8cea6536cc5db759de50.tar.bz2 |
Get rid of variable length arrays.
Review URL: http://codereview.chromium.org/92005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_posix.cc')
-rw-r--r-- | base/process_util_posix.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 3570a16..562b8e9 100644 --- a/base/process_util_posix.cc +++ b/base/process_util_posix.cc @@ -345,11 +345,11 @@ bool GetAppOutput(const CommandLine& cl, std::string* output) { close(dev_null); const std::vector<std::string> argv = cl.argv(); - char* argv_cstr[argv.size() + 1]; + scoped_array<char*> argv_cstr(new char*[argv.size() + 1]); for (size_t i = 0; i < argv.size(); i++) argv_cstr[i] = const_cast<char*>(argv[i].c_str()); argv_cstr[argv.size()] = NULL; - execvp(argv_cstr[0], argv_cstr); + execvp(argv_cstr[0], argv_cstr.get()); exit(127); } default: // parent |