Code cleanups.

This commit is contained in:
Jonathan Naylor 2018-09-10 09:11:57 +01:00
parent ad31455d8f
commit b1197eef49
3 changed files with 14 additions and 14 deletions

View file

@ -92,9 +92,9 @@ bool CConf::read()
char* value = ::strtok(NULL, "\r\n");
if (section == SECTION_GENERAL) {
if (::strcmp(key, "Callsign") == 0) {
for (int i=0; value[i]; i++) {
if (!isspace(value[i]))
m_callsign.insert(m_callsign.end(),1, value[i]);
for (unsigned int i = 0U; value[i] != '\0'; i++) {
if (!::isspace(value[i]))
m_callsign.insert(m_callsign.end(), 1, value[i]);
}
}
else if (::strcmp(key, "WhiteList") == 0) {
@ -130,9 +130,9 @@ bool CConf::read()
else if (::strcmp(key, "Port") == 0)
m_dapnetPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "AuthKey") == 0) {
for (int i=0; value[i]; i++) {
if (!isspace(value[i]))
m_dapnetAuthKey.insert(m_dapnetAuthKey.end(),1, value[i]);
for (unsigned int i = 0U; value[i] != '\0'; i++) {
if (!::isspace(value[i]))
m_dapnetAuthKey.insert(m_dapnetAuthKey.end(), 1, value[i]);
}
}
else if (::strcmp(key, "Debug") == 0)
@ -147,7 +147,7 @@ bool CConf::read()
std::string CConf::getCallsign() const
{
return m_callsign;
return m_callsign;
}
std::vector<uint32_t> CConf::getWhiteList() const
@ -192,12 +192,12 @@ unsigned int CConf::getLogFileLevel() const
std::string CConf::getLogFilePath() const
{
return m_logFilePath;
return m_logFilePath;
}
std::string CConf::getLogFileRoot() const
{
return m_logFileRoot;
return m_logFileRoot;
}
std::string CConf::getDAPNETAddress() const
@ -219,4 +219,3 @@ bool CConf::getDAPNETDebug() const
{
return m_dapnetDebug;
}