]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/import/pull.c
basic: add new helper call empty_or_dash_to_null()
[thirdparty/systemd.git] / src / import / pull.c
index 6342f7d7f1f918ad887be68294c7fb9e2844eea7..7e8712493fb5412592695a0e2f4bd412172e66be 100644 (file)
@@ -64,8 +64,7 @@ static int pull_tar(int argc, char *argv[], void *userdata) {
                 local = l;
         }
 
-        if (empty_or_dash(local))
-                local = NULL;
+        local = empty_or_dash_to_null(local);
 
         if (local) {
                 r = tar_strip_suffixes(local, &ll);
@@ -151,8 +150,7 @@ static int pull_raw(int argc, char *argv[], void *userdata) {
                 local = l;
         }
 
-        if (empty_or_dash(local))
-                local = NULL;
+        local = empty_or_dash_to_null(local);
 
         if (local) {
                 r = raw_strip_suffixes(local, &ll);