Merge pull request #10893 from yonghengdexin735/wip-zzz-1

rados: check for negative return value of rados_create_with_context() as its comment put

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2017-04-23 15:47:58 -05:00 committed by GitHub
commit d764b56822

View File

@ -1861,9 +1861,8 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
// open rados
ret = rados.init_with_context(g_ceph_context);
if (ret) {
if (ret < 0) {
cerr << "couldn't initialize rados: " << cpp_strerror(ret) << std::endl;
ret = -1;
goto out;
}