mirror of
https://github.com/znc/znc.git
synced 2026-08-11 19:32:46 +02:00
Fix more warnings and #197
This commit is contained in:
+1
-1
@@ -412,7 +412,7 @@ ssize_t CFile::Write(const char *pszBuffer, size_t iBytes) {
|
||||
}
|
||||
|
||||
ssize_t res = write(m_iFD, pszBuffer, iBytes);
|
||||
if (res != iBytes)
|
||||
if (-1 == res)
|
||||
m_bHadError = true;
|
||||
return res;
|
||||
}
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ static void seedPRNG() {
|
||||
|
||||
// This is in [0:1e6], which means that roughly 20 bits are
|
||||
// actually used, let's try to shuffle the high bits.
|
||||
seed ^= (tv.tv_usec << 10) | tv.tv_usec;
|
||||
seed ^= uint32_t((tv.tv_usec << 10) | tv.tv_usec);
|
||||
} else
|
||||
seed = (unsigned int)time(NULL);
|
||||
|
||||
|
||||
+1
-1
@@ -582,7 +582,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
|
||||
CUtils::GetInput("Listen Host", sListenHost, sListenHost, "Blank for all ips");
|
||||
|
||||
CUtils::PrintAction("Verifying the listener");
|
||||
CListener* pListener = new CListener(uListenPort, sListenHost, bListenSSL,
|
||||
CListener* pListener = new CListener((unsigned short int)uListenPort, sListenHost, bListenSSL,
|
||||
b6 ? ADDR_ALL : ADDR_IPV4ONLY, CListener::ACCEPT_ALL);
|
||||
if (!pListener->Listen()) {
|
||||
CUtils::PrintStatus(false, FormatBindError());
|
||||
|
||||
Reference in New Issue
Block a user