summaryrefslogtreecommitdiff
path: root/src/import/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/import.c')
-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 e3a1ae8a8b..cc28557459 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -49,15 +49,13 @@ static int import_tar(int argc, char *argv[], void *userdata) {
if (argc >= 2)
path = argv[1];
- if (isempty(path) || streq(path, "-"))
- path = NULL;
+ path = empty_or_dash_to_null(path);
if (argc >= 3)
local = argv[2];
else if (path)
local = basename(path);
- if (isempty(local) || streq(local, "-"))
- local = NULL;
+ local = empty_or_dash_to_null(local);
if (local) {
r = tar_strip_suffixes(local, &ll);
@@ -145,15 +143,13 @@ static int import_raw(int argc, char *argv[], void *userdata) {
if (argc >= 2)
path = argv[1];
- if (isempty(path) || streq(path, "-"))
- path = NULL;
+ path = empty_or_dash_to_null(path);
if (argc >= 3)
local = argv[2];
else if (path)
local = basename(path);
- if (isempty(local) || streq(local, "-"))
- local = NULL;
+ local = empty_or_dash_to_null(local);
if (local) {
r = raw_strip_suffixes(local, &ll);