]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: use !empty() instead of size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 17:02:19 +0000 (18:02 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 17:02:19 +0000 (18:02 +0100)
[src/os/FileStore.cc:3635]: (performance) Possible inefficient checking
  for 'omap_set' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/os/FileStore.cc

index 36f500b5606431fe5a6fd5e964eee19cf6a86312..376c39776db7d419614a557d6ce355bab2217f56 100644 (file)
@@ -3632,7 +3632,7 @@ int FileStore::_setattrs(coll_t cid, const ghobject_t& oid, map<string,bufferptr
     inline_to_set.insert(*p);
   }
 
-  if (spill_out != 1 && omap_set.size()) {
+  if (spill_out != 1 && !omap_set.empty()) {
     chain_fsetxattr(**fd, XATTR_SPILL_OUT_NAME, XATTR_SPILL_OUT,
                    sizeof(XATTR_SPILL_OUT));
   }