From: Danny Al-Gaaf Date: Tue, 14 May 2013 15:02:56 +0000 (+0200) Subject: src/dupstore.cc: check return value of list_collections() X-Git-Tag: v0.63~29^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a52350dd886353444fdcdcc79f28ff8f62a9aab;p=ceph.git 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 > &)" without checking return value (as is done elsewhere 5 out of 6 times). Signed-off-by: Danny Al-Gaaf --- diff --git a/src/dupstore.cc b/src/dupstore.cc index b0ba26109e99..e17eb2201a7a 100644 --- a/src/dupstore.cc +++ b/src/dupstore.cc @@ -31,7 +31,13 @@ int dupstore(ObjectStore* src, ObjectStore* dst) // collections vector 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;