summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-11-22 23:10:26 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-11-22 23:11:20 +0100
commitbf4095801958ffd3ffaec219198f3aba5a484206 (patch)
treed62374a011f4a01b875d0c99818361d8ae896a29 /src
parentb591613f2e17476ed8da29f4089c410b010c0192 (diff)
systemctl: do not return uninitialized r
Regresssed during port to extract_first_word in 5ab22f3321d238957c03dcc6a6db76491e3989b8 CID #1338060
Diffstat (limited to 'src')
-rw-r--r--src/systemctl/systemctl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 240fa2c551..f478d809c2 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -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(;;) {