Fix some uses of NULL that have snuck back in during a merge.

This commit is contained in:
Sadie Powell 2023-05-07 19:27:59 +01:00
parent 1b7026e2e1
commit 1aead0066a
2 changed files with 2 additions and 2 deletions

View File

@ -233,7 +233,7 @@ private:
Modes::ChangeList changelist;
for (const auto& [_, mh] : ServerInstance->Modes.GetModes(MODETYPE_CHANNEL))
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.
}

View File

@ -146,7 +146,7 @@ inline ssize_t writev(int fd, const WindowsIOVec* iov, int count)
inline std::string GetErrorMessage(DWORD dwErrorCode)
{
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);
return szErrorString;
}