diff options
Diffstat (limited to 'src/basic/mkdir.c')
-rw-r--r-- | src/basic/mkdir.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c index bd9cb76ddf..41638f7a81 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c @@ -80,15 +80,11 @@ int mkdir_safe_internal( } int mkdir_errno_wrapper(const char *pathname, mode_t mode) { - if (mkdir(pathname, mode) < 0) - return -errno; - return 0; + return RET_NERRNO(mkdir(pathname, mode)); } int mkdirat_errno_wrapper(int dirfd, const char *pathname, mode_t mode) { - if (mkdirat(dirfd, pathname, mode) < 0) - return -errno; - return 0; + return RET_NERRNO(mkdirat(dirfd, pathname, mode)); } int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags) { |