summaryrefslogtreecommitdiff
path: root/0001-Use-reference-in-loop-in-listpodsandbox.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-Use-reference-in-loop-in-listpodsandbox.patch')
-rw-r--r--0001-Use-reference-in-loop-in-listpodsandbox.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/0001-Use-reference-in-loop-in-listpodsandbox.patch b/0001-Use-reference-in-loop-in-listpodsandbox.patch
new file mode 100644
index 0000000..25b0754
--- /dev/null
+++ b/0001-Use-reference-in-loop-in-listpodsandbox.patch
@@ -0,0 +1,26 @@
+From 3f949cbfe601de10d813fd08a5ca58cdc5a7258e Mon Sep 17 00:00:00 2001
+From: xuxuepeng <xuxuepeng1@huawei.com>
+Date: Tue, 29 Aug 2023 19:21:27 +0800
+Subject: [PATCH] Use reference in loop in listpodsandbox
+
+Signed-off-by: xuxuepeng <xuxuepeng1@huawei.com>
+---
+ src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc b/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc
+index 33b700f3..687f4e6d 100644
+--- a/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc
++++ b/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc
+@@ -739,7 +739,7 @@ void PodSandboxManagerService::ListPodSandbox(const runtime::v1::PodSandboxFilte
+
+ sandbox::SandboxManager::GetInstance()->ListAllSandboxes(filter, sandboxes);
+
+- for (const auto sandbox : sandboxes) {
++ for (const auto &sandbox : sandboxes) {
+ std::unique_ptr<runtime::v1::PodSandbox> pod(new runtime::v1::PodSandbox);
+
+ pod->set_id(sandbox->GetId());
+--
+2.40.1
+