diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-14 22:40:49 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-16 08:04:09 +0100 |
commit | 7c248223ebafb9bfde9af978cd1ccfc57dcced26 (patch) | |
tree | 228bcda6699a2ae88ad01fd1f5f024f2b5d7b0a0 /src/import | |
parent | ef470ffa234c8c824897488195fb2fc9a4a520e6 (diff) | |
download | systemd-7c248223ebafb9bfde9af978cd1ccfc57dcced26.tar.gz |
tree-wide: use new RET_NERRNO() helper at various places
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/import-tar.c | 2 | ||||
-rw-r--r-- | src/import/pull-tar.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/import/import-tar.c b/src/import/import-tar.c index 35db30de78..8cbdbaa35f 100644 --- a/src/import/import-tar.c +++ b/src/import/import-tar.c @@ -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; diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index 67e06a1445..9608129e5e 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -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; |