Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2017-02-15 13:22:10 +0300
committerHieu Hoang <hieuhoang@gmail.com>2017-02-15 13:22:10 +0300
commitf8f4087aac52a5686f2a5c7a498daba670919165 (patch)
tree469a7def208ff60d5dc69334803d3192efefc765 /moses2/legacy
parent75a736964819fc77a72ac360d7ae5a46f76bbaf5 (diff)
change new -> alloca
Diffstat (limited to 'moses2/legacy')
-rw-r--r--moses2/legacy/Parameter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/moses2/legacy/Parameter.cpp b/moses2/legacy/Parameter.cpp
index f8af5f90d..7376c1099 100644
--- a/moses2/legacy/Parameter.cpp
+++ b/moses2/legacy/Parameter.cpp
@@ -571,7 +571,7 @@ bool Parameter::LoadParam(int argc, char* xargv[])
{
// legacy parameter handling: all parameters are expected
// to start with a single dash
- char **argv = new char*[argc + 1];
+ char **argv = (char**) alloca(argc * sizeof(char*));
for (int i = 0; i < argc; ++i) {
argv[i] = xargv[i];