summaryrefslogtreecommitdiff
path: root/modules/extra/m_ldap.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/extra/m_ldap.cpp
parentdfcc025a19d7d49179d75f34553c36e0d47eaded (diff)
Use C++11 style class/struct initialisation.
Diffstat (limited to 'modules/extra/m_ldap.cpp')
-rw-r--r--modules/extra/m_ldap.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index e9182d7d9..b72c9af56 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -29,18 +29,15 @@ class LDAPRequest
public:
LDAPService *service;
LDAPInterface *inter;
- LDAPMessage *message; /* message returned by ldap_ */
- LDAPResult *result; /* final result */
+ LDAPMessage *message = nullptr; /* message returned by ldap_ */
+ LDAPResult *result = nullptr; /* final result */
struct timeval tv;
- QueryType type;
+ QueryType type = QUERY_UNKNOWN;
LDAPRequest(LDAPService *s, LDAPInterface *i)
: service(s)
, inter(i)
- , message(NULL)
- , result(NULL)
{
- type = QUERY_UNKNOWN;
tv.tv_sec = 0;
tv.tv_usec = 100000;
}
@@ -147,7 +144,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition
LDAP *con;
- time_t last_connect;
+ time_t last_connect = 0;
public:
static LDAPMod **BuildMods(const LDAPMods &attributes)
@@ -232,7 +229,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition
query_queue queries, results;
Mutex process_mutex; /* held when processing requests not in either queue */
- LDAPService(Module *o, const Anope::string &n, const Anope::string &s, const Anope::string &b, const Anope::string &p) : LDAPProvider(o, n), server(s), admin_binddn(b), admin_pass(p), last_connect(0)
+ LDAPService(Module *o, const Anope::string &n, const Anope::string &s, const Anope::string &b, const Anope::string &p) : LDAPProvider(o, n), server(s), admin_binddn(b), admin_pass(p)
{
Connect();
}