Commit 5ef27ce7 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

lib: fix array value accessor to use preferred style

Reviewed-by: 's avatarLaine Stump <laine@laine.org>
Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent 7c7ba358
......@@ -1275,7 +1275,7 @@ sub get_ip_from_leases{
my $net = $conn->get_network_by_name($netname);
if ($net->can('get_dhcp_leases')) {
my @leases = $net->get_dhcp_leases($mac);
return @leases ? @leases[0]->{'ipaddr'} : undef;
return @leases ? $leases[0]->{'ipaddr'} : undef;
}
my $tmp = `grep $mac /var/lib/libvirt/dnsmasq/default.leases`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment