Re: [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]

 



On 06/08/2018 10:55 AM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>

What? You've found a style error in my cargo-cult perl? Astounding!! :-P
(My recollection is that I tried several different combinations until I
hit on one that worked. I don't perl so good...)


Reviewed-by: Laine Stump <laine@xxxxxxxxx>

> ---
>  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`;


--
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