summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-11-23 00:10:37 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-11-23 00:10:37 -0500
commit8c93f4ed7b597ced30b0cf9906e14c33ddc7656a (patch)
treed62374a011f4a01b875d0c99818361d8ae896a29 /src/systemctl/systemctl.c
parentb591613f2e17476ed8da29f4089c410b010c0192 (diff)
parentbf4095801958ffd3ffaec219198f3aba5a484206 (diff)
Merge pull request #1988 from phomes/systemctl-uninitialized2
systemctl: do not return uninitialized r
Diffstat (limited to 'src/systemctl/systemctl.c')
-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(;;) {