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 | 302a41c90b1da252028d957fbe2f7bf255b08878 (patch) | |
| tree | 64db485f5643383be2aac4f75d86014f494db4c7 /src | |
| parent | 866f4a94461d765f7f9514b6cb6e82d7b9ea12d2 (diff) | |
| download | googletest-302a41c90b1da252028d957fbe2f7bf255b08878.tar.gz googletest-302a41c90b1da252028d957fbe2f7bf255b08878.tar.bz2 googletest-302a41c90b1da252028d957fbe2f7bf255b08878.zip | |
Small code simplification (by Vlad Losev).
Diffstat (limited to 'src')
| -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 91f16de8..bf4cbc67 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); | 
