]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: remove unnecessary assignment
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 16 Jul 2025 09:49:25 +0000 (11:49 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Jul 2025 12:03:10 +0000 (21:03 +0900)
src/systemctl/systemctl-is-enabled.c

index 58d0d27fd7b032dc2e9e8f3d61c6bb5feefcd175..32966e24a2f1adc5f2dd966d5afb7eac9c89c2bb 100644 (file)
@@ -82,7 +82,7 @@ int verb_is_enabled(int argc, char *argv[], void *userdata) {
         not_found = r == 0; /* Doesn't have SysV support or SYSV_UNIT_NOT_FOUND */
         enabled = r == SYSV_UNIT_ENABLED;
 
-        if (install_client_side()) {
+        if (install_client_side())
                 STRV_FOREACH(name, names) {
                         UnitFileState state;
 
@@ -114,9 +114,7 @@ int verb_is_enabled(int argc, char *argv[], void *userdata) {
                                 }
                         }
                 }
-
-                r = 0;
-        } else {
+        else {
                 _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
                 sd_bus *bus;