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
@@ -228,7 +228,7 @@ static int tar_import_fork_tar(TarImport *i) {
|
||||
if (i->flags & IMPORT_BTRFS_SUBVOL)
|
||||
r = btrfs_subvol_make_fallback(d, 0755);
|
||||
else
|
||||
r = mkdir(d, 0755) < 0 ? -errno : 0;
|
||||
r = RET_NERRNO(mkdir(d, 0755));
|
||||
if (r == -EEXIST && (i->flags & IMPORT_DIRECT)) /* EEXIST is OK if in direct mode, but not otherwise,
|
||||
* because in that case our temporary path collided */
|
||||
r = 0;
|
||||
|
||||
@@ -520,7 +520,7 @@ static int tar_pull_job_on_open_disk_tar(PullJob *j) {
|
||||
if (i->flags & PULL_BTRFS_SUBVOL)
|
||||
r = btrfs_subvol_make_fallback(where, 0755);
|
||||
else
|
||||
r = mkdir(where, 0755) < 0 ? -errno : 0;
|
||||
r = RET_NERRNO(mkdir(where, 0755));
|
||||
if (r == -EEXIST && (i->flags & PULL_DIRECT)) /* EEXIST is OK if in direct mode, but not otherwise,
|
||||
* because in that case our temporary path collided */
|
||||
r = 0;
|
||||
|
||||
Reference in New Issue
Block a user