From 1aead0066a82b24dc1f1968bfed324b1ca51ec0c Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 7 May 2023 19:27:59 +0100 Subject: [PATCH] Fix some uses of NULL that have snuck back in during a merge. --- src/modules/m_codepage.cpp | 2 +- win/inspircd_win32wrapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index 8aa747da7..183addb3f 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -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. } diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 7ba3963e0..0438f2c43 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -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; }