summaryrefslogtreecommitdiff
path: root/src/import/pull-dkr.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-26 17:30:56 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 13:25:55 +0100
commit5f311f8c0e51e2f13773823feb6a71f7c6f2838c (patch)
tree6edfc648016e7000715e11c1ede94fde32e88d82 /src/import/pull-dkr.c
parente4e73a632524c382139034d4271f53b6089ab4cb (diff)
util: remove path_get_parent(), in favour of dirname_malloc()
We don't need two functions that do essentialy the same, hence drop path_get_parent(), and stick to dirname_malloc(), but move it to path-util.[ch].
Diffstat (limited to 'src/import/pull-dkr.c')
-rw-r--r--src/import/pull-dkr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c
index 1cd9e7b0bd..448dbafa9f 100644
--- a/src/import/pull-dkr.c
+++ b/src/import/pull-dkr.c
@@ -479,13 +479,13 @@ static int dkr_pull_make_local_copy(DkrPull *i, DkrPullVersion version) {
if (!i->final_path) {
i->final_path = strjoin(i->image_root, "/.dkr-", i->id, NULL);
if (!i->final_path)
- return log_oom();
+ return -ENOMEM;
}
if (version == DKR_PULL_V2) {
- r = path_get_parent(i->image_root, &p);
- if (r < 0)
- return r;
+ p = dirname_malloc(i->image_root);
+ if (!p)
+ return -ENOMEM;
}
r = pull_make_local_copy(i->final_path, p ?: i->image_root, i->local, i->force_local);