diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gtest-death-test.cc | 4 | ||||
-rw-r--r-- | src/gtest-port.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc index 1ad2d6d5..517495b5 100644 --- a/src/gtest-death-test.cc +++ b/src/gtest-death-test.cc @@ -810,7 +810,7 @@ class Arguments { } } void AddArgument(const char* argument) { - args_.insert(args_.end() - 1, strdup(argument)); + args_.insert(args_.end() - 1, posix::StrDup(argument)); } template <typename Str> @@ -818,7 +818,7 @@ class Arguments { for (typename ::std::vector<Str>::const_iterator i = arguments.begin(); i != arguments.end(); ++i) { - args_.insert(args_.end() - 1, strdup(i->c_str())); + args_.insert(args_.end() - 1, posix::StrDup(i->c_str())); } } char* const* Argv() { diff --git a/src/gtest-port.cc b/src/gtest-port.cc index 02998424..ef213892 100644 --- a/src/gtest-port.cc +++ b/src/gtest-port.cc @@ -98,7 +98,7 @@ bool RE::PartialMatch(const char* str, const RE& re) { // Initializes an RE from its string representation. void RE::Init(const char* regex) { - pattern_ = strdup(regex); + pattern_ = posix::StrDup(regex); // Reserves enough bytes to hold the regular expression used for a // full match. @@ -346,7 +346,7 @@ bool RE::PartialMatch(const char* str, const RE& re) { void RE::Init(const char* regex) { pattern_ = full_pattern_ = NULL; if (regex != NULL) { - pattern_ = posix::strdup(regex); + pattern_ = posix::StrDup(regex); } is_valid_ = ValidateRegex(regex); |