Remove some pointless if statements

This commit is contained in:
Kyle Fuller
2011-03-27 23:21:28 +01:00
parent e62ec2dc82
commit d735e9d881
7 changed files with 10 additions and 48 deletions
+2 -6
View File
@@ -348,9 +348,7 @@ bool CZNC::DeletePidFile() {
CUtils::PrintAction("Deleting pid file [" + File->GetLongName() + "]");
bool bRet = false;
if (File->Delete())
bRet = true;
bool bRet = File->Delete();
delete File;
CUtils::PrintStatus(bRet);
@@ -416,9 +414,7 @@ bool CZNC::IsHostAllowed(const CString& sHostMask) const {
bool CZNC::AllowConnectionFrom(const CString& sIP) const {
if (m_uiAnonIPLimit == 0)
return true;
if (GetManager().GetAnonConnectionCount(sIP) >= m_uiAnonIPLimit)
return false;
return true;
return (GetManager().GetAnonConnectionCount(sIP) < m_uiAnonIPLimit)
}
void CZNC::InitDirs(const CString& sArgvPath, const CString& sDataDir) {