tree-wide: use new RET_NERRNO() helper at various places
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
ef470ffa23
commit
7c248223eb
+2
-6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user