From: Suyash Dongre Date: Fri, 10 May 2024 17:13:42 +0000 (+0530) Subject: current_status is being used after moving. X-Git-Tag: v20.0.0~1892^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6b451cc0ba438b02de0824edc5faa2bfd267ad39;p=ceph.git current_status is being used after moving. clang-tidy was re-ran on the file and the warning now no longer pops up. Fixes: https://tracker.ceph.com/issues/65963 Signed-off-by: Suyash Dongre --- diff --git a/src/rgw/driver/rados/rgw_rest_log.cc b/src/rgw/driver/rados/rgw_rest_log.cc index 9c0467ec36a4..9315dfc0afd8 100644 --- a/src/rgw/driver/rados/rgw_rest_log.cc +++ b/src/rgw/driver/rados/rgw_rest_log.cc @@ -1101,7 +1101,7 @@ void RGWOp_BILog_Status::execute(optional_yield y) } if (status.inc_status.empty()) { - status.inc_status = std::move(current_status); + std::swap(status.inc_status, current_status); } else { if (current_status.size() != status.inc_status.size()) { op_ret = -EINVAL;