]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
label: move label_ops_reset() up a bit
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 15:47:22 +0000 (17:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Oct 2024 15:51:26 +0000 (17:51 +0200)
Let#s move it close to label_ops_set(), since it is somewhat symmetric
to it.

src/basic/label.c
src/basic/label.h

index 18f6214fad4f3864c2bda64fb42818988633a034..6bae653188a3d1eeedea3c6b884e339144bb5d8f 100644 (file)
@@ -18,6 +18,10 @@ int label_ops_set(const LabelOps *ops) {
         return 0;
 }
 
+void label_ops_reset(void) {
+        label_ops = NULL;
+}
+
 int label_ops_pre(int dir_fd, const char *path, mode_t mode) {
         if (!label_ops || !label_ops->pre)
                 return 0;
@@ -31,7 +35,3 @@ int label_ops_post(int dir_fd, const char *path, bool created) {
 
         return label_ops->post(dir_fd, path, created);
 }
-
-void label_ops_reset(void) {
-        label_ops = NULL;
-}
index eb851bcb4f4a24bcc12d35e0ed9ee26fbf2e5029..d001307a4fd5089d44a0c88160ad0a59cb3dba9b 100644 (file)
@@ -10,8 +10,7 @@ typedef struct LabelOps {
 } LabelOps;
 
 int label_ops_set(const LabelOps *label_ops);
+void label_ops_reset(void);
 
 int label_ops_pre(int dir_fd, const char *path, mode_t mode);
 int label_ops_post(int dir_fd, const char *path, bool created);
-
-void label_ops_reset(void);