mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Fix some uses of NULL that have snuck back in during a merge.
This commit is contained in:
parent
1b7026e2e1
commit
1aead0066a
@ -233,7 +233,7 @@ private:
|
|||||||
Modes::ChangeList changelist;
|
Modes::ChangeList changelist;
|
||||||
for (const auto& [_, mh] : ServerInstance->Modes.GetModes(MODETYPE_CHANNEL))
|
for (const auto& [_, mh] : ServerInstance->Modes.GetModes(MODETYPE_CHANNEL))
|
||||||
mh->RemoveMode(chan, changelist);
|
mh->RemoveMode(chan, changelist);
|
||||||
ServerInstance->Modes.Process(ServerInstance->FakeClient, chan, NULL, changelist, ModeParser::MODE_LOCALONLY);
|
ServerInstance->Modes.Process(ServerInstance->FakeClient, chan, nullptr, changelist, ModeParser::MODE_LOCALONLY);
|
||||||
|
|
||||||
// The channel will be destroyed automatically by CheckDestroy.
|
// The channel will be destroyed automatically by CheckDestroy.
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ inline ssize_t writev(int fd, const WindowsIOVec* iov, int count)
|
|||||||
inline std::string GetErrorMessage(DWORD dwErrorCode)
|
inline std::string GetErrorMessage(DWORD dwErrorCode)
|
||||||
{
|
{
|
||||||
char szErrorString[1024];
|
char szErrorString[1024];
|
||||||
if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)szErrorString, _countof(szErrorString), NULL) == 0)
|
if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)szErrorString, _countof(szErrorString), nullptr) == 0)
|
||||||
sprintf_s(szErrorString, _countof(szErrorString), "Error code: %u", dwErrorCode);
|
sprintf_s(szErrorString, _countof(szErrorString), "Error code: %u", dwErrorCode);
|
||||||
return szErrorString;
|
return szErrorString;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user