summaryrefslogtreecommitdiff
path: root/Source/cmELF.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-01 23:29:53 +0200
committerBrad King <brad.king@kitware.com>2016-06-02 08:24:04 -0400
commit7f6b8d3399dd841b0d29bf74d2b31021738c4ef8 (patch)
tree9b9184028cba2f16fdcc1c10ac5fb5467f09bff7 /Source/cmELF.cxx
parentd6754d37d593a0189809dcf98bc4fdf3a609f0a3 (diff)
downloadcmake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.gz
Simplify boolean expressions
Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
Diffstat (limited to 'Source/cmELF.cxx')
-rw-r--r--Source/cmELF.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 26f1a44e8e..c7f8a2d62d 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -143,7 +143,7 @@ public:
{
this->Stream.seekg(pos);
this->Stream.read(buf, size);
- return this->Stream ? true : false;
+ return !this->Stream.fail();
}
// Lookup the SONAME in the DYNAMIC section.
@@ -497,7 +497,7 @@ private:
this->NeedSwap) {
ByteSwap(x);
}
- return this->Stream ? true : false;
+ return !this->Stream.fail();
}
bool Read(ELF_Dyn& x)
{
@@ -505,7 +505,7 @@ private:
this->NeedSwap) {
ByteSwap(x);
}
- return this->Stream ? true : false;
+ return !this->Stream.fail();
}
bool LoadSectionHeader(ELF_Half i)