From: Lennart Poettering Date: Fri, 22 Jan 2021 15:47:22 +0000 (+0100) Subject: import: don't apply empty_or_dash_to_null() to stuff we know is NULL anyway X-Git-Tag: v248-rc1~269^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f5a21324cec54aaee5427edd3bb876c08fc0bf7;p=thirdparty%2Fsystemd.git import: don't apply empty_or_dash_to_null() to stuff we know is NULL anyway --- diff --git a/src/import/import.c b/src/import/import.c index 3fd99d11603..d358eec49c4 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);