]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/dupstore.cc: check return value of list_collections()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 14 May 2013 15:02:56 +0000 (17:02 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 14 May 2013 16:44:06 +0000 (18:44 +0200)
CID 1019545 (#1 of 1): Unchecked return value (CHECKED_RETURN)
  check_return: Calling function "ObjectStore::list_collections
  (std::vector<coll_t, std::allocator<coll_t> > &)" without
  checking return value (as is done elsewhere 5 out of 6 times).

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

index b0ba26109e9922b1b7a100dcc2019871961dbe54..e17eb2201a7a0fc7068aa7d2928fd640db5c2abe 100644 (file)
@@ -31,7 +31,13 @@ int dupstore(ObjectStore* src, ObjectStore* dst)
 
   // collections
   vector<coll_t> collections;
-  src->list_collections(collections);
+
+  int ret =  src->list_collections(collections);
+  if (ret < 0) {
+      cerr << "Error " << ret << " while listing collections" << std::endl;
+      return 1;
+  }
+
   int num = collections.size();
   cout << num << " collections" << std::endl;
   int i = 1;