summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2023-03-28 11:03:13 +0200
committerDavid Tardon <dtardon@redhat.com>2023-04-11 16:11:11 +0200
commitcc8fc3d3db3a6a63312b8b1222b5592f842273a3 (patch)
tree31c2416a21042bde3ff76badafe0530b0835aeb2 /src/systemctl
parentae9ff778cd141f9d24dd4743489b7e1000f22347 (diff)
downloadsystemd-cc8fc3d3db3a6a63312b8b1222b5592f842273a3.tar.gz
systemctl-preset-all: shorten code a tiny bit
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-preset-all.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/systemctl/systemctl-preset-all.c b/src/systemctl/systemctl-preset-all.c
index 6f221a87b9..70e302e126 100644
--- a/src/systemctl/systemctl-preset-all.c
+++ b/src/systemctl/systemctl-preset-all.c
@@ -48,12 +48,11 @@ int verb_preset_all(int argc, char *argv[], void *userdata) {
if (r < 0)
return r;
- if (arg_no_reload)
- return 0;
-
- r = daemon_reload(ACTION_RELOAD, /* graceful= */ false);
- if (r < 0)
- return r;
+ if (!arg_no_reload) {
+ r = daemon_reload(ACTION_RELOAD, /* graceful= */ false);
+ if (r < 0)
+ return r;
+ }
}
return 0;