From: Lennart Poettering Date: Thu, 7 Jul 2022 21:22:04 +0000 (+0200) Subject: mkdir-label: don't use mkdirat_errno_wrapper() without reason X-Git-Tag: v252-rc1~699 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebbbf44ab95195de64698e3d911ad6d2b2542bea;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c index 5b1ac5d1e01..60673614c35 100644 --- a/src/shared/mkdir-label.c +++ b/src/shared/mkdir-label.c @@ -2,6 +2,7 @@ #include +#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;