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>
// 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;