diff options
| author | 2014-10-13 19:07:44 +0200 | |
|---|---|---|
| committer | 2014-10-13 19:07:44 +0200 | |
| commit | 9bb839b6a2873a366ac8685c3c8846b6837f85ca (patch) | |
| tree | 34b4fdfa7ba3419081089790d1665c5abc249719 /src/configreader.cpp | |
| parent | m_ssl_openssl Allow configuring raw OpenSSL context options (diff) | |
| parent | Avoid calling methods on NULL pointers wherever possible. (diff) | |
Merge pull request #933 from SaberUK/insp20+fix-llvm34
Fix various warnings when building with LLVM 3.5.
Diffstat (limited to 'src/configreader.cpp')
| -rw-r--r-- | src/configreader.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 060f66d16..b5d2fdb16 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -48,6 +48,14 @@ ServerConfig::ServerConfig() OperMaxChans = 30; c_ipv4_range = 32; c_ipv6_range = 128; + + std::vector<KeyVal>* items; + EmptyTag = ConfigTag::create("empty", "<auto>", 0, items); +} + +ServerConfig::~ServerConfig() +{ + delete EmptyTag; } void ServerConfig::Update005() @@ -888,7 +896,7 @@ ConfigTag* ServerConfig::ConfValue(const std::string &tag) { ConfigTagList found = config_data.equal_range(tag); if (found.first == found.second) - return NULL; + return EmptyTag; ConfigTag* rv = found.first->second; found.first++; if (found.first != found.second) |
