summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/import/import.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/import/import.c b/src/import/import.c
index 3fd99d1160..d358eec49c 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -48,14 +48,12 @@ static int import_tar(int argc, char *argv[], void *userdata) {
int r, fd;
if (argc >= 2)
- path = argv[1];
- path = empty_or_dash_to_null(path);
+ path = empty_or_dash_to_null(argv[1]);
if (argc >= 3)
- local = argv[2];
+ local = empty_or_dash_to_null(argv[2]);
else if (path)
local = basename(path);
- local = empty_or_dash_to_null(local);
if (local) {
r = tar_strip_suffixes(local, &ll);
@@ -143,14 +141,12 @@ static int import_raw(int argc, char *argv[], void *userdata) {
int r, fd;
if (argc >= 2)
- path = argv[1];
- path = empty_or_dash_to_null(path);
+ path = empty_or_dash_to_null(argv[1]);
if (argc >= 3)
- local = argv[2];
+ local = empty_or_dash_to_null(argv[2]);
else if (path)
local = basename(path);
- local = empty_or_dash_to_null(local);
if (local) {
r = raw_strip_suffixes(local, &ll);