diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-14 17:02:56 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-14 18:44:06 +0200 |
commit | 8a52350dd886353444fdcdcc79f28ff8f62a9aab (patch) | |
tree | ea208e490e767e31eeb4537797ed01b903bf8be7 | |
parent | 70a4a971f4b46e80d288abe413adb6e2876d8f71 (diff) | |
download | ceph-8a52350dd886353444fdcdcc79f28ff8f62a9aab.tar.gz |
src/dupstore.cc: check return value of list_collections()
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>
-rw-r--r-- | src/dupstore.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dupstore.cc b/src/dupstore.cc index b0ba26109e9..e17eb2201a7 100644 --- a/src/dupstore.cc +++ b/src/dupstore.cc @@ -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; |