diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-07-07 23:22:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-07-08 16:10:26 +0200 |
commit | ebbbf44ab95195de64698e3d911ad6d2b2542bea (patch) | |
tree | 22bf42db1931298b70e266e43f6a6f4b4b92dc9b /src/shared/mkdir-label.c | |
parent | time-util: fix buffer-over-run (diff) | |
download | systemd-ebbbf44ab95195de64698e3d911ad6d2b2542bea.tar.xz systemd-ebbbf44ab95195de64698e3d911ad6d2b2542bea.zip |
mkdir-label: don't use mkdirat_errno_wrapper() without reason
mkdirat_errno_wrapper(x,y,z) is identical to RET_NERRNO(mkdirat(x, y,
z)). Let's always use the latter when we can, because easier to read,
shorter.
The only reason to have mkdirat_errno_wrapper() at all is so that we can
pass a function pointer to it around. Otherwise, let's not use it.
Diffstat (limited to 'src/shared/mkdir-label.c')
-rw-r--r-- | src/shared/mkdir-label.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c index 5b1ac5d1e0..60673614c3 100644 --- a/src/shared/mkdir-label.c +++ b/src/shared/mkdir-label.c @@ -2,6 +2,7 @@ #include <sys/stat.h> +#include "errno-util.h" #include "mkdir-label.h" #include "selinux-util.h" #include "smack-util.h" @@ -16,7 +17,7 @@ int mkdirat_label(int dirfd, const char *path, mode_t mode) { if (r < 0) return r; - r = mkdirat_errno_wrapper(dirfd, path, mode); + r = RET_NERRNO(mkdirat(dirfd, path, mode)); mac_selinux_create_file_clear(); if (r < 0) return r; |