mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
CFile::Close(): check return value of close() for errors
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1476 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -372,7 +372,10 @@ int CFile::Write(const CString & sData) {
|
||||
}
|
||||
void CFile::Close() {
|
||||
if (m_iFD >= 0) {
|
||||
close(m_iFD);
|
||||
if (close(m_iFD) < 0) {
|
||||
DEBUG("CFile::Close(): close() failed with ["
|
||||
<< strerror(errno) << "]");
|
||||
}
|
||||
}
|
||||
m_iFD = -1;
|
||||
ClearBuffer();
|
||||
|
||||
Reference in New Issue
Block a user