summaryrefslogtreecommitdiffstats
path: root/Source/cmFileLockUnix.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 20:45:24 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 20:45:24 (GMT)
commit516f8edb2e061749c56b6f9a58332fbf59e45a1a (patch)
tree82ebe3f38b5248ef0b78586019ac1dca44ce2370 /Source/cmFileLockUnix.cxx
parentd9f5d3c50fe376423382d6445f7fb2906a43469e (diff)
downloadCMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.zip
CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.gz
CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.bz2
Avoid else after return
Diffstat (limited to 'Source/cmFileLockUnix.cxx')
-rw-r--r--Source/cmFileLockUnix.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmFileLockUnix.cxx b/Source/cmFileLockUnix.cxx
index 6be6abc..64ced9e 100644
--- a/Source/cmFileLockUnix.cxx
+++ b/Source/cmFileLockUnix.cxx
@@ -37,9 +37,8 @@ cmFileLockResult cmFileLock::Release()
if (lockResult == 0) {
return cmFileLockResult::MakeOk();
- } else {
- return cmFileLockResult::MakeSystem();
}
+ return cmFileLockResult::MakeSystem();
}
cmFileLockResult cmFileLock::OpenFile()
@@ -47,18 +46,16 @@ cmFileLockResult cmFileLock::OpenFile()
this->File = ::open(this->Filename.c_str(), O_RDWR);
if (this->File == -1) {
return cmFileLockResult::MakeSystem();
- } else {
- return cmFileLockResult::MakeOk();
}
+ return cmFileLockResult::MakeOk();
}
cmFileLockResult cmFileLock::LockWithoutTimeout()
{
if (this->LockFile(F_SETLKW, F_WRLCK) == -1) {
return cmFileLockResult::MakeSystem();
- } else {
- return cmFileLockResult::MakeOk();
}
+ return cmFileLockResult::MakeOk();
}
cmFileLockResult cmFileLock::LockWithTimeout(unsigned long seconds)