]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/ceph_monstore_tool: s/BOOST_SCOPE_EXIT/make_scope_guard/
authorKefu Chai <kchai@redhat.com>
Thu, 10 Jun 2021 08:52:48 +0000 (16:52 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 10 Jun 2021 12:29:50 +0000 (20:29 +0800)
more consistent this way.

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

index a1384708904dac19acf988a1017eeaff60193bf2..05c815f0e39c361e7e131f7637f2e5f6784f923b 100644 (file)
@@ -905,12 +905,12 @@ int main(int argc, char **argv) {
       }
     }
 
-    BOOST_SCOPE_EXIT((&r) (&fd) (&outpath)) {
+    auto close_fd = make_scope_guard([&] {
       ::close(fd);
       if (r < 0 && fd != STDOUT_FILENO) {
         ::remove(outpath.c_str());
       }
-    } BOOST_SCOPE_EXIT_END
+    });
 
     bufferlist bl;
     r = 0;