portablectl: no need to validate profile name before checking whether it is 'help'
This commit is contained in:
parent
f524522bde
commit
b3c66c4497
|
@ -884,14 +884,14 @@ static int parse_argv(int argc, char *argv[]) {
|
|||
break;
|
||||
|
||||
case 'p':
|
||||
if (streq(optarg, "help"))
|
||||
return dump_profiles();
|
||||
|
||||
if (!filename_is_valid(optarg)) {
|
||||
log_error("Unit profile name not valid: %s", optarg);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (streq(optarg, "help"))
|
||||
return dump_profiles();
|
||||
|
||||
arg_profile = optarg;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue