mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
systemctl: do not return uninitialized r
Regresssed during port to extract_first_word in 5ab22f3321d238957c03dcc6a6db76491e3989b8 CID #1338060
This commit is contained in:
parent
b591613f2e
commit
bf40958019
@ -6550,8 +6550,10 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
|
||||
return version();
|
||||
|
||||
case 't': {
|
||||
if (isempty(optarg))
|
||||
return log_error_errno(r, "--type requires arguments.");
|
||||
if (isempty(optarg)) {
|
||||
log_error("--type requires arguments.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
p = optarg;
|
||||
for(;;) {
|
||||
@ -6783,8 +6785,10 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
|
||||
break;
|
||||
|
||||
case ARG_STATE: {
|
||||
if (isempty(optarg))
|
||||
return log_error_errno(r, "--signal requires arguments.");
|
||||
if (isempty(optarg)) {
|
||||
log_error("--signal requires arguments.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
p = optarg;
|
||||
for(;;) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user