]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix valid coverity warnings 14023/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 17 Mar 2017 18:53:35 +0000 (14:53 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 17 Mar 2017 18:53:35 +0000 (14:53 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/mirror/GetStatusRequest.cc
src/tools/rbd/Utils.cc

index 7899321577f70897bcb73f1ef4cc94dba7ae7046..b21a16a1f8d1bc7a9ef75e92cbe8ed2e8aae62e9 100644 (file)
@@ -91,6 +91,7 @@ void GetStatusRequest<I>::handle_get_status(int r) {
     lderr(cct) << "failed to retrieve mirror image status: " << cpp_strerror(r)
                << dendl;
     finish(r);
+    return;
   }
 
   finish(0);
index 7a1c9d36ef38728ae96942a4d1851e4db07fbd4c..99ffc8053c468f5ac0f2cac5c6bb5b6c49df1e72 100644 (file)
@@ -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;
   }