From 4ffecbbbee17bf7a71b54758d4792615608df2ec Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Oct 2024 17:47:22 +0200 Subject: [PATCH] label: move label_ops_reset() up a bit Let#s move it close to label_ops_set(), since it is somewhat symmetric to it. --- src/basic/label.c | 8 ++++---- src/basic/label.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/basic/label.c b/src/basic/label.c index 18f6214fad4..6bae653188a 100644 --- a/src/basic/label.c +++ b/src/basic/label.c @@ -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; -} diff --git a/src/basic/label.h b/src/basic/label.h index eb851bcb4f4..d001307a4fd 100644 --- a/src/basic/label.h +++ b/src/basic/label.h @@ -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);