]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/admin: use moved string for constructing vector<>
authorKefu Chai <kchai@redhat.com>
Tue, 9 Mar 2021 14:25:23 +0000 (22:25 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 9 Mar 2021 14:32:36 +0000 (22:32 +0800)
it is the last consumer of cmdline, so move it away.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/admin/admin_socket.cc

index f8ba8de140fb93b5f8dadf2ef21e069410d39c03..eb182d28d7eca3145f65c6bb5594e308a17ffbca 100644 (file)
@@ -141,7 +141,7 @@ seastar::future<> AdminSocket::handle_command(crimson::net::ConnectionRef conn,
 seastar::future<> AdminSocket::execute_line(std::string cmdline,
                                             seastar::output_stream<char>& out)
 {
-  return execute_command({cmdline}, {}).then([&out, this](auto result) {
+  return execute_command({std::move(cmdline)}, {}).then([&out, this](auto result) {
      auto [ret, stderr, stdout] = std::move(result);
      if (ret < 0) {
        stdout.append(fmt::format("ERROR: {}\n", cpp_strerror(ret)));