summaryrefslogtreecommitdiffstats
path: root/src/import/import-fs.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-08 12:03:33 +0200
committerLennart Poettering <lennart@poettering.net>2019-04-08 12:03:33 +0200
commite7b88b7bc1b33af3966349ca59ecd3d25c3e8504 (patch)
treed0ebd1d919bca2916a84c89351b77007ad30ec46 /src/import/import-fs.c
parentMerge pull request #12238 from keszybz/one-genuine-bugfix+lots-of-line-wrapping (diff)
downloadsystemd-e7b88b7bc1b33af3966349ca59ecd3d25c3e8504.tar.xz
systemd-e7b88b7bc1b33af3966349ca59ecd3d25c3e8504.zip
tree-wide: introduce empty_or_dash() helper
At quite a few places we check isempty() || streq(…, "-"), let's add a helper to simplify that, and replace that by a single function call.
Diffstat (limited to 'src/import/import-fs.c')
-rw-r--r--src/import/import-fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/import/import-fs.c b/src/import/import-fs.c
index 974c0f5536..9f3ef0826c 100644
--- a/src/import/import-fs.c
+++ b/src/import/import-fs.c
@@ -117,14 +117,14 @@ static int import_fs(int argc, char *argv[], void *userdata) {
if (argc >= 2)
path = argv[1];
- if (isempty(path) || streq(path, "-"))
+ if (empty_or_dash(path))
path = NULL;
if (argc >= 3)
local = argv[2];
else if (path)
local = basename(path);
- if (isempty(local) || streq(local, "-"))
+ if (empty_or_dash(local))
local = NULL;
if (local) {