]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd-mirror: don't use temporary string for snap operation
authorJason Dillaman <dillaman@redhat.com>
Mon, 2 May 2016 12:42:35 +0000 (08:42 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 2 May 2016 14:35:57 +0000 (10:35 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/image_sync/SyncPointPruneRequest.cc

index 332cb00e083423c5272bf429352e8c41d3fe00db..7e6ab2e2b159de525c56cdbf11ba13200c7f36fa 100644 (file)
@@ -89,7 +89,7 @@ void SyncPointPruneRequest<I>::send_remove_snap() {
     return;
   }
 
-  std::string snap_name = m_snap_names.front();
+  const std::string &snap_name = m_snap_names.front();
 
   CephContext *cct = m_remote_image_ctx->cct;
   ldout(cct, 20) << ": snap_name=" << snap_name << dendl;