9 Star 5 Fork 47

src-openEuler/iSulad

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0163-image-layer-fix-code-style.patch 3.72 KB
一键复制 编辑 原始数据 按行查看 历史
jingxiaolu 提交于 2024-12-30 20:45 +08:00 . Sync patches from upstream
From 255fada49877e854690d628dc7832c3e459fd5aa Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Thu, 5 Dec 2024 19:59:15 +0800
Subject: [PATCH 05/19] image layer:fix code style
Signed-off-by: liuxu <liuxu156@huawei.com>
---
.../modules/image/oci/storage/layer_store/layer.c | 9 +++++----
.../modules/image/oci/storage/layer_store/layer.h | 6 +++---
.../image/oci/storage/layer_store/layer_store.c | 11 ++++++-----
.../image/oci/storage/layer_store/layer_store.h | 5 +++--
4 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/daemon/modules/image/oci/storage/layer_store/layer.c b/src/daemon/modules/image/oci/storage/layer_store/layer.c
index 4beb3d10..8fd9aa5b 100644
--- a/src/daemon/modules/image/oci/storage/layer_store/layer.c
+++ b/src/daemon/modules/image/oci/storage/layer_store/layer.c
@@ -15,16 +15,17 @@
#include "layer.h"
-#include <isula_libutils/json_common.h>
-#include <isula_libutils/storage_layer.h>
#include <stdlib.h>
#include <string.h>
+#include <isula_libutils/json_common.h>
+#include <isula_libutils/storage_layer.h>
+#include <isula_libutils/storage_mount_point.h>
+#include <isula_libutils/log.h>
+
#include "constants.h"
-#include "isula_libutils/storage_mount_point.h"
#include "util_atomic.h"
#include "utils.h"
-#include "isula_libutils/log.h"
#include "utils_file.h"
void free_layer_t(layer_t *ptr)
diff --git a/src/daemon/modules/image/oci/storage/layer_store/layer.h b/src/daemon/modules/image/oci/storage/layer_store/layer.h
index 9387efe0..94831ef4 100644
--- a/src/daemon/modules/image/oci/storage/layer_store/layer.h
+++ b/src/daemon/modules/image/oci/storage/layer_store/layer.h
@@ -20,9 +20,9 @@
#include <stdbool.h>
#include <stddef.h>
-#include "isula_libutils/storage_layer.h"
-#include "isula_libutils/storage_mount_point.h"
-#include "isula_libutils/log.h"
+#include <isula_libutils/storage_layer.h>
+#include <isula_libutils/storage_mount_point.h>
+#include <isula_libutils/log.h>
#ifdef __cplusplus
extern "C" {
diff --git a/src/daemon/modules/image/oci/storage/layer_store/layer_store.c b/src/daemon/modules/image/oci/storage/layer_store/layer_store.c
index 3ffe0ca7..bb2e7edc 100644
--- a/src/daemon/modules/image/oci/storage/layer_store/layer_store.c
+++ b/src/daemon/modules/image/oci/storage/layer_store/layer_store.c
@@ -19,6 +19,11 @@
#include <stdio.h>
#include <limits.h>
#include <dirent.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
#include <isula_libutils/container_inspect.h>
#include <isula_libutils/storage_layer.h>
#include <isula_libutils/storage_mount_point.h>
@@ -26,10 +31,6 @@
#include <isula_libutils/log.h>
#include <isula_libutils/storage_entry.h>
#include <isula_libutils/go_crc64.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
#include "util_archive.h"
#include "storage.h"
@@ -1709,7 +1710,7 @@ static int load_layers_from_json_files()
}
ret = 0;
- goto unlock_out;
+
unlock_out:
layer_store_unlock();
return ret;
diff --git a/src/daemon/modules/image/oci/storage/layer_store/layer_store.h b/src/daemon/modules/image/oci/storage/layer_store/layer_store.h
index eba406d4..a1b0857e 100644
--- a/src/daemon/modules/image/oci/storage/layer_store/layer_store.h
+++ b/src/daemon/modules/image/oci/storage/layer_store/layer_store.h
@@ -16,11 +16,12 @@
#define DAEMON_MODULES_IMAGE_OCI_STORAGE_LAYER_STORE_LAYER_STORE_H
#include <stdint.h>
-#include <isula_libutils/imagetool_fs_info.h>
-#include <isula_libutils/json_common.h>
#include <stdbool.h>
#include <stddef.h>
+#include <isula_libutils/imagetool_fs_info.h>
+#include <isula_libutils/json_common.h>
+
#include "storage.h"
#include "io_wrapper.h"
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/iSulad.git
git@gitee.com:src-openeuler/iSulad.git
src-openeuler
iSulad
iSulad
master

搜索帮助