summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-12-13 18:41:05 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-15 16:40:25 (GMT)
commit414aa6c81ec62ab2f728fab31aa189ce674484a4 (patch)
tree0b70c8ae470b1cfebd205af33754bf577c3b277d /Source/CPack
parentd4a42dd4a87c9caa222a7a40150db937258698d2 (diff)
downloadCMake-414aa6c81ec62ab2f728fab31aa189ce674484a4.zip
CMake-414aa6c81ec62ab2f728fab31aa189ce674484a4.tar.gz
CMake-414aa6c81ec62ab2f728fab31aa189ce674484a4.tar.bz2
clang-tidy: Simplify boolean expressions
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/OSXScriptLauncher.cxx3
-rw-r--r--Source/CPack/cmCPackFreeBSDGenerator.cxx9
2 files changed, 3 insertions, 9 deletions
diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx
index d3de02b..4966d09 100644
--- a/Source/CPack/OSXScriptLauncher.cxx
+++ b/Source/CPack/OSXScriptLauncher.cxx
@@ -46,8 +46,7 @@ int main(int argc, char* argv[])
// get the file system path of the url as a cstring
// in an encoding suitable for posix apis
- if (CFURLGetFileSystemRepresentation(scriptFileURL, true, path, PATH_MAX) ==
- false) {
+ if (!CFURLGetFileSystemRepresentation(scriptFileURL, true, path, PATH_MAX)) {
DebugError("CFURLGetFileSystemRepresentation failed");
return 1;
}
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index 2fcd1a8..1e6b118 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -257,13 +257,8 @@ void cmCPackFreeBSDGenerator::write_manifest_fields(
static bool ignore_file(const std::string& filename)
{
struct stat statbuf;
-
- if (!((stat(filename.c_str(), &statbuf) >= 0) &&
- ((statbuf.st_mode & S_IFMT) == S_IFREG))) {
- return true;
- }
- // May be other reasons to return false
- return false;
+ return stat(filename.c_str(), &statbuf) < 0 ||
+ (statbuf.st_mode & S_IFMT) != S_IFREG;
}
// Write the given list of @p files to the manifest stream @p s,