diff options
| author | 2020-02-06 11:25:42 +0000 | |
|---|---|---|
| committer | 2020-02-06 11:25:42 +0000 | |
| commit | 98e4ddfb21d285c8b675788c155bb204822fbd4a (patch) | |
| tree | 030eb18c989bf3c9e4768a538796e3221ca7934e /src/modules/m_spanningtree/utils.h | |
| parent | In C++11 [io]fstream has std::string constructors; use them. (diff) | |
Use C++11 inline initialisation for class members.
Diffstat (limited to 'src/modules/m_spanningtree/utils.h')
| -rw-r--r-- | src/modules/m_spanningtree/utils.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index eb9d76652..01c474f8e 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -86,7 +86,7 @@ class SpanningTreeUtilities : public classbase unsigned int PingWarnTime; /** This variable represents the root of the server tree */ - TreeServer *TreeRoot; + TreeServer *TreeRoot = nullptr; /** IPs allowed to link to us */ std::vector<std::string> ValidIPs; @@ -107,8 +107,12 @@ class SpanningTreeUtilities : public classbase std::vector<reference<Autoconnect> > AutoconnectBlocks; /** Ping frequency of server to server links + * XXX: TreeServer constructor reads this and TreeRoot is created before the + * config is read, so init it to something (value doesn't matter) to avoid a + * valgrind warning in TimerManager on unload */ - unsigned int PingFreq; + unsigned int PingFreq = 60; + /** Initialise utility class */ |
