diff options
author | Max Kellermann <max@duempel.org> | 2014-12-26 13:50:54 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-26 13:50:54 +0100 |
commit | 665031467a55a32be306191514ac81f73ac41de7 (patch) | |
tree | d935344efd13dcb07c933083845c3f74e31745d5 | |
parent | df3317110766f659b6cc3e80b61c5fd88c4ce6b3 (diff) |
db/proxy, output/shout: fix implicit nullptr/bool conversion
Return false on error, not nullptr.
-rw-r--r-- | src/db/ProxyDatabasePlugin.cxx | 6 | ||||
-rw-r--r-- | src/output/ShoutOutputPlugin.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 92fe6ebac..1751e0950 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -592,7 +592,7 @@ ProxyDatabase::Visit(const DatabaseSelection &selection, { // TODO: eliminate the const_cast if (!const_cast<ProxyDatabase *>(this)->EnsureConnected(error)) - return nullptr; + return false; if (!visit_directory && !visit_playlist && selection.recursive && (ServerSupportsSearchBase(connection) @@ -617,7 +617,7 @@ ProxyDatabase::VisitUniqueTags(const DatabaseSelection &selection, { // TODO: eliminate the const_cast if (!const_cast<ProxyDatabase *>(this)->EnsureConnected(error)) - return nullptr; + return false; enum mpd_tag_type tag_type2 = Convert(tag_type); if (tag_type2 == MPD_TAG_COUNT) { @@ -657,7 +657,7 @@ ProxyDatabase::GetStats(const DatabaseSelection &selection, // TODO: eliminate the const_cast if (!const_cast<ProxyDatabase *>(this)->EnsureConnected(error)) - return nullptr; + return false; struct mpd_stats *stats2 = mpd_run_stats(connection); diff --git a/src/output/ShoutOutputPlugin.cxx b/src/output/ShoutOutputPlugin.cxx index 19f2b61cd..abef8d0b7 100644 --- a/src/output/ShoutOutputPlugin.cxx +++ b/src/output/ShoutOutputPlugin.cxx @@ -114,7 +114,7 @@ ShoutOutput::Configure(const config_param ¶m, Error &error) if (!audio_format.IsFullyDefined()) { error.Set(config_domain, "Need full audio format specification"); - return nullptr; + return false; } const char *host = require_block_string(param, "host"); |