summaryrefslogtreecommitdiff
path: root/0163-image-layer-fix-code-style.patch
blob: e3ba0a4d40b041a09303a0bcd6bd88035c626d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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