diff options
author | Adam <Adam@anope.org> | 2013-11-23 22:12:33 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-11-23 22:12:33 -0500 |
commit | 90aa576fb3c1ceae434c2a7b794f13941c80b7b3 (patch) | |
tree | 938d944e802f73c2ac1c33802f8cd508fd1a17ef /src | |
parent | 77e57443416fc12f77a1bcf23a7f0341b8d12f9f (diff) |
Fix/clean/clarify some stuff found by coverity scan
Diffstat (limited to 'src')
-rw-r--r-- | src/bots.cpp | 2 | ||||
-rw-r--r-- | src/language.cpp | 2 | ||||
-rw-r--r-- | src/logger.cpp | 4 | ||||
-rw-r--r-- | src/servers.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/bots.cpp b/src/bots.cpp index ddffe53fe..bf5d653b6 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -36,7 +36,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A // If we're synchronised with the uplink already, send the bot. if (Me && Me->IsSynced()) { - Anope::string tmodes = !this->botmodes.empty() ? ("+" + this->botmodes) : (IRCD ? IRCD->DefaultPseudoclientModes : ""); + Anope::string tmodes = !this->botmodes.empty() ? ("+" + this->botmodes) : IRCD->DefaultPseudoclientModes; if (!tmodes.empty()) this->SetModesInternal(this, tmodes.c_str()); diff --git a/src/language.cpp b/src/language.cpp index 6ae7ab152..de378be0f 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -88,7 +88,7 @@ const char *Language::Translate(const char *lang, const char *string) lang = Config->DefLanguage.c_str(); if (Anope::string(lang) == "en") - return string != NULL ? string : ""; + return string; ++_nl_msg_cat_cntr; #ifdef _WIN32 diff --git a/src/logger.cpp b/src/logger.cpp index 296b22dac..d9c0e5d66 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -145,7 +145,7 @@ Anope::string Log::BuildPrefix() const { case LOG_ADMIN: { - if (!this->c && !(this->u || this->nc)) + if (!this->c) break; buffer += "ADMIN: "; Anope::string cname = source != NULL && !source->command.empty() ? source->command : this->c->name; @@ -159,7 +159,7 @@ Anope::string Log::BuildPrefix() const } case LOG_OVERRIDE: { - if (!this->c && !(this->u || this->nc)) + if (!this->c) break; buffer += "OVERRIDE: "; Anope::string cname = source != NULL && !source->command.empty() ? source->command : this->c->name; diff --git a/src/servers.cpp b/src/servers.cpp index 4bd9746c3..713e4a66e 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -28,7 +28,7 @@ Anope::map<Server *> Servers::ByID; std::set<Anope::string> Servers::Capab; -Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Anope::string &desc, const Anope::string &ssid, bool jupe) : name(sname), hops(shops), description(desc), sid(ssid), uplink(up) +Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Anope::string &desc, const Anope::string &ssid, bool jupe) : name(sname), hops(shops), description(desc), sid(ssid), uplink(up), users(0) { syncing = true; juped = jupe; |