From b932cd429800bb24d71e1d60f954fe4df2d1eb5c Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Sat, 10 Dec 2016 16:55:49 +0100 Subject: clang-tidy: apply misc-redundant-expression fixes --- Source/CTest/cmCTestRunTest.cxx | 5 ++--- Source/cmCTest.cxx | 2 +- Source/cmDocumentationFormatter.cxx | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index fbc94cc..5c45fe5 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -119,10 +119,9 @@ void cmCTestRunTest::CompressOutput() strm.next_out = out; ret = deflate(&strm, Z_FINISH); - if (ret == Z_STREAM_ERROR || ret != Z_STREAM_END) { + if (ret != Z_STREAM_END) { cmCTestLog(this->CTest, ERROR_MESSAGE, - "Error during output " - "compression. Sending uncompressed output." + "Error during output compression. Sending uncompressed output." << std::endl); delete[] out; return; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index dfec0fb..559275e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2787,7 +2787,7 @@ bool cmCTest::CompressString(std::string& str) strm.next_out = &out[0]; ret = deflate(&strm, Z_FINISH); - if (ret == Z_STREAM_ERROR || ret != Z_STREAM_END) { + if (ret != Z_STREAM_END) { cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression." << std::endl); return false; diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 21a5209..0018263 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -156,7 +156,7 @@ void cmDocumentationFormatter::PrintColumn(std::ostream& os, const char* text) // Move to beginning of next word. Skip over whitespace. l = r; - while (*l && (*l == ' ')) { + while (*l == ' ') { ++l; } } -- cgit v0.12