From c56563a5cfb85fcba9f28dd1df9647037eb2931e Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 20 Jan 2024 09:57:05 +0000 Subject: automatic import of iSulad --- 0043-move-variable-declaration-out-of-loop.patch | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 0043-move-variable-declaration-out-of-loop.patch (limited to '0043-move-variable-declaration-out-of-loop.patch') diff --git a/0043-move-variable-declaration-out-of-loop.patch b/0043-move-variable-declaration-out-of-loop.patch new file mode 100644 index 0000000..26748eb --- /dev/null +++ b/0043-move-variable-declaration-out-of-loop.patch @@ -0,0 +1,34 @@ +From 261a924b656eea9eff2ca6cbdd611eb1f9555af7 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Thu, 30 Nov 2023 16:02:44 +1400 +Subject: [PATCH 43/64] move variable declaration out of loop + +Signed-off-by: zhongtao +--- + src/daemon/modules/runtime/isula/isula_rt_ops.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c +index 1e2ecdb2..3950ff4a 100644 +--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c ++++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c +@@ -612,6 +612,7 @@ out: + + static void transform_stats_info_from_runtime(shim_client_runtime_stats *stats, struct runtime_container_resources_stats_info *info) + { ++ size_t i; + if (stats == NULL || stats->data == NULL) { + return; + } +@@ -637,7 +638,7 @@ static void transform_stats_info_from_runtime(shim_client_runtime_stats *stats, + if (blkio == NULL) { + return; + } +- for (size_t i = 0; i < blkio->io_service_bytes_recursive_len; i++) { ++ for (i = 0; i < blkio->io_service_bytes_recursive_len; i++) { + if (strcasecmp(blkio->io_service_bytes_recursive[i]->op, "read") == 0) { + info->blkio_read += blkio->io_service_bytes_recursive[i]->value; + } +-- +2.42.0 + -- cgit v1.2.3