From: Kefu Chai Date: Thu, 10 Jun 2021 08:52:48 +0000 (+0800) Subject: tools/ceph_monstore_tool: s/BOOST_SCOPE_EXIT/make_scope_guard/ X-Git-Tag: v17.1.0~1639^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1a2976d8edcbf89759c32bb93cc4384d381e53f9;p=ceph.git tools/ceph_monstore_tool: s/BOOST_SCOPE_EXIT/make_scope_guard/ more consistent this way. Signed-off-by: Kefu Chai --- diff --git a/src/tools/ceph_monstore_tool.cc b/src/tools/ceph_monstore_tool.cc index a1384708904..05c815f0e39 100644 --- a/src/tools/ceph_monstore_tool.cc +++ b/src/tools/ceph_monstore_tool.cc @@ -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;