localnet: simplify code
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 3 Jul 2019 13:58:16 +0000 (15:58 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 3 Jul 2019 13:58:16 +0000 (15:58 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/Service/pve_firewall.pm

index e4dcc51..3c9fd66 100755 (executable)
@@ -274,9 +274,7 @@ __PACKAGE__->register_method ({
            PVE::Corosync::for_all_corosync_addresses($corosync_conf, undef, sub {
                my ($curr_node_name, $curr_node_ip, undef, $key) = @_;
 
-               if (!$corosync_node_found) {
-                   $corosync_node_found = 1;
-               }
+               $corosync_node_found = 1;
 
                $key =~ m/(?:ring|link)(\d+)_addr/;
                print " - $curr_node_name: $curr_node_ip (link: $1)\n";