]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machine: remove redundant else if lookup_machine_by_name_or_pid()
authorIvan Kruglov <mail@ikruglov.com>
Tue, 8 Oct 2024 16:55:39 +0000 (18:55 +0200)
committerIvan Kruglov <mail@ikruglov.com>
Thu, 10 Oct 2024 10:34:45 +0000 (12:34 +0200)
src/machine/machine-varlink.c

index 26b1e841a6009ab292f584b5e70607fb5f75f209..0f14e3063ab68b861181bdb3a5d4f30f8549b81e 100644 (file)
@@ -267,7 +267,7 @@ int lookup_machine_by_name_or_pid(sd_varlink *link, Manager *manager, const char
 
         if (machine && pid_machine && machine != pid_machine)
                 return log_debug_errno(SYNTHETIC_ERRNO(ESRCH), "Search by machine name '%s' and pid %d resulted in two different machines", machine_name, pid);
-        else if (machine)
+        if (machine)
                 *ret_machine = machine;
         else if (pid_machine)
                 *ret_machine = pid_machine;