fixed bugs in urfd.* file handlers

pull/2/head
Tom Early 3 years ago
parent 86e4e4c9b2
commit ba2042a8e7

@ -97,7 +97,7 @@ bool CBlackWhiteSet::ReloadFromFile(void)
{ {
bool ok = false; bool ok = false;
if ( m_Filename.empty() ) if ( ! m_Filename.empty() )
{ {
ok = LoadFromFile(m_Filename); ok = LoadFromFile(m_Filename);
} }

@ -31,7 +31,7 @@ class CBlackWhiteSet
{ {
public: public:
// constructor // constructor
CBlackWhiteSet() : m_Filename(nullptr), m_LastModTime(0) {} CBlackWhiteSet() : m_LastModTime(0) {}
// locks // locks
void Lock(void) const { m_Mutex.lock(); } void Lock(void) const { m_Mutex.lock(); }

@ -33,7 +33,7 @@
CInterlinkMap::CInterlinkMap() CInterlinkMap::CInterlinkMap()
{ {
m_Filename = nullptr; m_Filename.clear();
::memset(&m_LastModTime, 0, sizeof(time_t)); ::memset(&m_LastModTime, 0, sizeof(time_t));
} }
@ -119,7 +119,7 @@ bool CInterlinkMap::LoadFromFile(const std::string &filename)
file.close(); file.close();
// keep file path // keep file path
m_Filename = filename; m_Filename.assign(filename);
// update time // update time
GetLastModTime(&m_LastModTime); GetLastModTime(&m_LastModTime);

Loading…
Cancel
Save

Powered by TurnKey Linux.