1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00

systemctl: do not return uninitialized r

Regresssed during port to extract_first_word in
5ab22f3321

CID #1338060
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2015-11-22 23:10:26 +01:00
parent b591613f2e
commit bf40958019

View File

@ -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(;;) {