summaryrefslogtreecommitdiff
path: root/modules/m_httpd.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2022-01-03 18:34:16 +0000
committerSadie Powell <sadie@witchery.services>2022-01-04 00:17:13 +0000
commit7531e90499d4cd60b6464c692725225e85c00738 (patch)
tree930fd946ea495b74c4071a67e12cadb700ab79ab /modules/m_httpd.cpp
parentdfcc025a19d7d49179d75f34553c36e0d47eaded (diff)
Use C++11 style class/struct initialisation.
Diffstat (limited to 'modules/m_httpd.cpp')
-rw-r--r--modules/m_httpd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/m_httpd.cpp b/modules/m_httpd.cpp
index 715e42c3d..ad2a28b99 100644
--- a/modules/m_httpd.cpp
+++ b/modules/m_httpd.cpp
@@ -41,19 +41,19 @@ class MyHTTPClient : public HTTPClient
{
HTTPProvider *provider;
HTTPMessage message;
- bool header_done, served;
+ bool header_done = false, served = false;
Anope::string page_name;
Reference<HTTPPage> page;
Anope::string ip;
- unsigned content_length;
+ unsigned content_length = 0;
enum
{
ACTION_NONE,
ACTION_GET,
ACTION_POST
- } action;
+ } action = ACTION_NONE;
void Serve()
{
@@ -94,7 +94,7 @@ class MyHTTPClient : public HTTPClient
public:
time_t created;
- MyHTTPClient(HTTPProvider *l, int f, const sockaddrs &a) : Socket(f, l->IsIPv6()), HTTPClient(l, f, a), provider(l), header_done(false), served(false), ip(a.addr()), content_length(0), action(ACTION_NONE), created(Anope::CurTime)
+ MyHTTPClient(HTTPProvider *l, int f, const sockaddrs &a) : Socket(f, l->IsIPv6()), HTTPClient(l, f, a), provider(l), ip(a.addr()), created(Anope::CurTime)
{
Log(LOG_DEBUG, "httpd") << "Accepted connection " << f << " from " << a.addr();
}