Fix a couple of issues pointed out by https://scan.coverity.com/

This commit is contained in:
Alexey Sokolov
2016-12-26 17:22:09 +00:00
parent b666931883
commit 2fcde9f2e1
6 changed files with 23 additions and 42 deletions
+1 -2
View File
@@ -472,8 +472,7 @@ void CFile::Close() {
void CFile::ClearBuffer() { m_sBuffer.clear(); }
bool CFile::TryExLock(const CString& sLockFile, int iFlags) {
Open(sLockFile, iFlags);
return TryExLock();
return Open(sLockFile, iFlags) && TryExLock();
}
bool CFile::TryExLock() { return Lock(F_WRLCK, false); }