diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-16 17:36:39 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-16 17:36:39 +0000 |
commit | 5739b9887f084ae06a0bf6099fd56e6f204fbe26 (patch) | |
tree | 64db485f5643383be2aac4f75d86014f494db4c7 /src/gtest-death-test.cc | |
parent | 2962b23886e9b922398b573fadfa7993f1cb26d7 (diff) | |
download | gtest-5739b9887f084ae06a0bf6099fd56e6f204fbe26.tar.gz gtest-5739b9887f084ae06a0bf6099fd56e6f204fbe26.tar.bz2 gtest-5739b9887f084ae06a0bf6099fd56e6f204fbe26.tar.xz |
Small code simplification (by Vlad Losev).
git-svn-id: http://googletest.googlecode.com/svn/trunk@308 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-death-test.cc')
-rw-r--r-- | src/gtest-death-test.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc index 91f16de..bf4cbc6 100644 --- a/src/gtest-death-test.cc +++ b/src/gtest-death-test.cc @@ -269,12 +269,11 @@ static void FailFromInternalError(int fd) { } while (num_read == -1 && errno == EINTR); if (num_read == 0) { - GTEST_LOG_(FATAL) << error.GetString().c_str(); + GTEST_LOG_(FATAL) << error.GetString(); } else { const int last_error = errno; - const String message = GetLastErrnoDescription(); GTEST_LOG_(FATAL) << "Error while reading death test internal: " - << message.c_str() << " [" << last_error << "]"; + << GetLastErrnoDescription() << " [" << last_error << "]"; } } @@ -402,7 +401,7 @@ void DeathTestImpl::ReadAndInterpretStatusByte() { } } else { GTEST_LOG_(FATAL) << "Read from death test child process failed: " - << GetLastErrnoDescription().c_str(); + << GetLastErrnoDescription(); } GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd())); set_read_fd(-1); |