]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/admin_socket_output: no need to create a copy of fs::path
authorKefu Chai <kchai@redhat.com>
Thu, 8 Feb 2018 11:08:36 +0000 (19:08 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 8 Feb 2018 14:37:53 +0000 (22:37 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/admin_socket_output.cc

index 7b2f224f2649b58e8d77c677958d338941147eec..89db393f65d4178b787c2a58a0767ca9d62cddf9 100644 (file)
@@ -76,7 +76,7 @@ bool AdminSocketOutput::init_sockets() {
   std::cout << "Initialising sockets" << std::endl;
   for (const auto &x : fs::directory_iterator(socketdir)) {
     std::cout << x.path() << std::endl;
-    if (fs::path(x.path()).extension() == ".asok") {
+    if (x.path().extension() == ".asok") {
       for (auto &target : targets) {
         if (std::regex_search(x.path().filename().string(),
             std::regex(prefix + target + R"(\..*\.asok)"))) {