[tck PATCH v2 15/15] lib: fix array value accessor to use preferred style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 lib/Sys/Virt/TCK.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
index 60bd136..78d3774 100644
--- a/lib/Sys/Virt/TCK.pm
+++ b/lib/Sys/Virt/TCK.pm
@@ -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`;
-- 
2.17.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux