From 3c455a8511f8c72552afb6ebe35a8e7c9b9af979 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 30 Jul 2022 17:21:47 +0100 Subject: Modernize various minor legacy C++isms. --- src/modules/m_haproxy.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/modules/m_haproxy.cpp') diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index db3da710b..393fb6297 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -136,7 +136,7 @@ class HAProxyHook final { private: // The length of the address section. - uint16_t address_length; + uint16_t address_length = 0; // The endpoint the client is connecting from. irc::sockets::sockaddrs client; @@ -151,7 +151,7 @@ private: UserCertificateAPI& sslapi; // The current state of the PROXY parser. - HAProxyState state; + HAProxyState state = HPS_WAITING_FOR_HEADER; size_t ReadProxyTLV(StreamSocket* sock, size_t start_index, uint16_t buffer_length) { @@ -379,9 +379,7 @@ private: public: HAProxyHook(std::shared_ptr Prov, StreamSocket* sock, UserCertificateAPI& api) : IOHookMiddle(Prov) - , address_length(0) , sslapi(api) - , state(HPS_WAITING_FOR_HEADER) { sock->AddIOHook(this); } -- cgit v1.3.1-10-gc9f91