diff options
| -rw-r--r-- | src/modules/m_codepage.cpp | 3 | ||||
| -rw-r--r-- | src/threadsocket.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index 90d771e78..f72907bcf 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -175,7 +175,7 @@ class ModuleCodepage final { private: // The currently active codepage. - std::unique_ptr<Codepage> codepage; + std::unique_ptr<Codepage> codepage = nullptr; // The character map which was set before this module was loaded. const unsigned char* origcasemap; @@ -237,7 +237,6 @@ public: ModuleCodepage() : Module(VF_VENDOR | VF_COMMON, "Allows the server administrator to define what characters are allowed in nicknames and how characters should be compared in a case insensitive way.") , ISupport::EventListener(this) - , codepage(nullptr) , origcasemap(national_case_insensitive_map) , origcasemapname(ServerInstance->Config->CaseMapping) , origisnick(ServerInstance->IsNick) diff --git a/src/threadsocket.cpp b/src/threadsocket.cpp index 86b36eac0..323376b98 100644 --- a/src/threadsocket.cpp +++ b/src/threadsocket.cpp @@ -29,7 +29,9 @@ class ThreadSignalSocket final : public EventHandler { - SocketThread* parent; +private: + SocketThread* parent = nullptr; + public: ThreadSignalSocket(SocketThread* p, int newfd) : parent(p) { @@ -67,10 +69,10 @@ public: SocketThread::SocketThread() { - socket = nullptr; int fd = eventfd(0, EFD_NONBLOCK); if (fd < 0) throw CoreException("Could not create pipe " + std::string(strerror(errno))); + socket = new ThreadSignalSocket(this, fd); } #else |
