]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pcrlock: use empty_or_dash() more 30518/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 18 Dec 2023 16:26:19 +0000 (17:26 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 18 Dec 2023 16:26:19 +0000 (17:26 +0100)
src/pcrlock/pcrlock.c

index dc48bc57e5628eb2566b7011f4d3e183e15010e9..5bac04519bed1fac77002d2a4807f83b36aa0dcd 100644 (file)
@@ -4906,7 +4906,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_PCRLOCK:
-                        if (isempty(optarg) || streq(optarg, "-"))
+                        if (empty_or_dash(optarg))
                                 arg_pcrlock_path = mfree(arg_pcrlock_path);
                         else {
                                 r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_pcrlock_path);
@@ -4918,7 +4918,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_POLICY:
-                        if (isempty(optarg) || streq(optarg, "-"))
+                        if (empty_or_dash(optarg))
                                 arg_policy_path = mfree(arg_policy_path);
                         else {
                                 r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_policy_path);