From 53573e950f74f482bbbb594aa4516de050dc4e34 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 18 Jan 2014 16:02:21 +0100 Subject: [PATCH] db/upnp: remove unnecessary m_superdir nullptr checks --- src/db/UpnpDatabasePlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx index 064eb6db2..054e20377 100644 --- a/src/db/UpnpDatabasePlugin.cxx +++ b/src/db/UpnpDatabasePlugin.cxx @@ -215,7 +215,7 @@ upnpItemToSong(const UPnPDirObject &dirent, const char *uri) Song * UpnpDatabase::GetSong(const char *uri, Error &error) const { - if (!m_superdir || !m_superdir->ok()) { + if (!m_superdir->ok()) { error.Set(upnp_domain, "UpnpDatabase::GetSong() superdir is sick"); return nullptr; @@ -688,7 +688,7 @@ UpnpDatabase::Visit(const DatabaseSelection &selection, Error &error) const { std::vector servers; - if (!m_superdir || !m_superdir->ok() || + if (!m_superdir->ok() || !m_superdir->getDirServices(servers)) { error.Set(upnp_domain, "UpnpDatabase::Visit() superdir is sick"); @@ -748,7 +748,7 @@ UpnpDatabase::VisitUniqueTags(const DatabaseSelection &selection, return true; std::vector servers; - if (!m_superdir || !m_superdir->ok() || + if (!m_superdir->ok() || !m_superdir->getDirServices(servers)) { error.Set(upnp_domain, "UpnpDatabase::Visit() superdir is sick");