aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-26 14:31:00 +0100
committerMax Kellermann <max@duempel.org>2014-12-26 14:34:03 +0100
commit163597ef6939e4250afafe12f821aa732b1fc2b7 (patch)
tree0c69d95f66789dd27788e28638a99d3a32956eef /src/db/plugins
parent95f84afd338a9333b2fcf05dc171ce1dad6fbe7c (diff)
downloadmpd-163597ef6939e4250afafe12f821aa732b1fc2b7.tar.gz
mpd-163597ef6939e4250afafe12f821aa732b1fc2b7.tar.xz
mpd-163597ef6939e4250afafe12f821aa732b1fc2b7.zip
db/simple: fix implicit nullptr/bool conversion
Return false on error, not nullptr.
Diffstat (limited to 'src/db/plugins')
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
index a0472462a..d6ad5e91f 100644
--- a/src/db/plugins/simple/SimpleDatabasePlugin.cxx
+++ b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
@@ -448,13 +448,13 @@ SimpleDatabase::Mount(const char *uri, Database *db, Error &error)
if (r.uri == nullptr) {
error.Format(db_domain, DB_CONFLICT,
"Already exists: %s", uri);
- return nullptr;
+ return false;
}
if (strchr(r.uri, '/') != nullptr) {
error.Format(db_domain, DB_NOT_FOUND,
"Parent not found: %s", uri);
- return nullptr;
+ return false;
}
Directory *mnt = r.directory->CreateChild(r.uri);
@@ -481,7 +481,7 @@ SimpleDatabase::Mount(const char *local_uri, const char *storage_uri,
if (cache_path.IsNull()) {
error.Format(db_domain, DB_NOT_FOUND,
"No 'cache_directory' configured");
- return nullptr;
+ return false;
}
std::string name(storage_uri);