From fa13eaf8da75293c7f8eea8fe71d9a3985c943f5 Mon Sep 17 00:00:00 2001 From: JustL Date: Mon, 9 Oct 2017 20:37:43 +0800 Subject: [PATCH] msg/async/rdma: unnecessary reinitiliazation of an iterator current_buffer iterator does not need to be reinitalized as no changes occur between the initialization and iteration steps. Signed-off-by: Justinas Lingys jlingys@connect.ust.hk --- src/msg/async/rdma/RDMAConnectedSocketImpl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc index c0c26459d6c02..2bb7a2cf3ff3b 100644 --- a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc +++ b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc @@ -541,7 +541,7 @@ int RDMAConnectedSocketImpl::post_work_request(std::vector &tx_buffers) memset(iswr, 0, sizeof(iswr)); memset(isge, 0, sizeof(isge)); - current_buffer = tx_buffers.begin(); + while (current_buffer != tx_buffers.end()) { isge[current_sge].addr = reinterpret_cast((*current_buffer)->buffer); isge[current_sge].length = (*current_buffer)->get_offset(); -- 2.39.5