]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client/Client.cc: prefer empty() over size() for emptiness check
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 14 Oct 2014 10:03:48 +0000 (12:03 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 21 Oct 2014 07:39:46 +0000 (09:39 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/Client.cc

index 29b92d964c696848a3150cef329ee5a9ab8e670b..18dcd5945a6d8f34e1180ce8fe5d7cf7a440b60f 100644 (file)
@@ -4157,7 +4157,7 @@ int Client::resolve_mds(
     // It is a wildcard: use all MDSs
     const std::map<mds_gid_t, MDSMap::mds_info_t> &mds_info = mdsmap->get_mds_info();
 
-    if (mds_info.size() == 0) {
+    if (mds_info.empty()) {
       lderr(cct) << __func__ << ": * passed but no MDS daemons found" << dendl;
       return -ENOENT;
     }