]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rbd: assert(g_ceph_context) not g_conf 23008/head
authorKefu Chai <kchai@redhat.com>
Thu, 12 Jul 2018 14:28:44 +0000 (22:28 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 12 Jul 2018 14:28:46 +0000 (22:28 +0800)
this addresses a warning introduced by f528475d:

src/tools/rbd/action/Create.cc:59:19: warning: the address of
'ConfigProxy& g_conf()' will never be NULL [-Waddress]
     assert(g_conf != nullptr);
            ~~~~~~~^~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/rbd/action/Create.cc

index dd259f4ad405ed1ebbe49a5bba72315a36e6997e..1ca005e664896a664b54e44fc45043f2bbb4ae00 100644 (file)
@@ -56,7 +56,7 @@ struct thick_provision_writer {
   {
     // If error cases occur, the code is aborted, because
     // constructor cannot return error value.
-    assert(g_conf != nullptr);
+    assert(g_ceph_context != nullptr);
     bl.append_zero(block_size);
 
     librbd::image_info_t info;