]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
current_status is being used after moving.
authorSuyash Dongre <suyashd999@gmail.com>
Fri, 10 May 2024 17:13:42 +0000 (22:43 +0530)
committerSuyash Dongre <suyashd999@gmail.com>
Sun, 12 May 2024 16:33:54 +0000 (22:03 +0530)
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 <suyashd999@gmail.com>
src/rgw/driver/rados/rgw_rest_log.cc

index 9c0467ec36a4960ee67f63ad3799626ca196fe66..9315dfc0afd8af7aab968272ac35f8ca3cb439f1 100644 (file)
@@ -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;