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.
This commit is contained in:
Lennart Poettering 2022-07-07 23:22:04 +02:00
parent 9102c625a6
commit ebbbf44ab9

View file

@ -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;