From: Jason Dillaman Date: Fri, 17 Mar 2017 18:53:35 +0000 (-0400) Subject: librbd: fix valid coverity warnings X-Git-Tag: v12.0.1~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14023%2Fhead;p=ceph.git librbd: fix valid coverity warnings Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/mirror/GetStatusRequest.cc b/src/librbd/mirror/GetStatusRequest.cc index 7899321577f7..b21a16a1f8d1 100644 --- a/src/librbd/mirror/GetStatusRequest.cc +++ b/src/librbd/mirror/GetStatusRequest.cc @@ -91,6 +91,7 @@ void GetStatusRequest::handle_get_status(int r) { lderr(cct) << "failed to retrieve mirror image status: " << cpp_strerror(r) << dendl; finish(r); + return; } finish(0); diff --git a/src/tools/rbd/Utils.cc b/src/tools/rbd/Utils.cc index 7a1c9d36ef38..99ffc8053c46 100644 --- a/src/tools/rbd/Utils.cc +++ b/src/tools/rbd/Utils.cc @@ -368,7 +368,7 @@ int get_pool_image_snapshot_names(const po::variables_map &vm, } } - if (pool_name->empty()) { + if (pool_name != nullptr && pool_name->empty()) { *pool_name = at::DEFAULT_POOL_NAME; }