diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-24 16:43:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-12-24 16:53:05 +0100 |
commit | 0c7bf33a989a58922b3eb9aaa96abd773c8754c4 (patch) | |
tree | 801e489c6be63152b900d2984e7c1a3ff99b4f2b /src/import | |
parent | a36544cd45d607ee7f075157f55e7f646df1d34f (diff) |
import: three minor fixes
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/import-dkr.c | 2 | ||||
-rw-r--r-- | src/import/import.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/import/import-dkr.c b/src/import/import-dkr.c index 05b10621bc..8f26191c40 100644 --- a/src/import/import-dkr.c +++ b/src/import/import-dkr.c @@ -1131,7 +1131,7 @@ int dkr_import_pull(DkrImport *import, const char *name, const char *tag, const n->force_local = force_local; } - r = hashmap_put(import->names, name, n); + r = hashmap_put(import->names, n->name, n); if (r < 0) return r; diff --git a/src/import/import.c b/src/import/import.c index 8b9ca4f724..54f311363a 100644 --- a/src/import/import.c +++ b/src/import/import.c @@ -73,7 +73,7 @@ static int pull_dkr(int argc, char *argv[], void *userdata) { local = name; } - if (streq(local, "-") || isempty(local)) + if (isempty(local) || streq(local, "-")) local = NULL; if (!dkr_name_is_valid(name)) { @@ -89,7 +89,7 @@ static int pull_dkr(int argc, char *argv[], void *userdata) { if (local) { const char *p; - if (!machine_name_is_valid(tag)) { + if (!machine_name_is_valid(local)) { log_error("Local image name '%s' is not valid.", local); return -EINVAL; } |