Re: [libvirt-glib] Prefer 'for' over 'while'

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

 



On Thu, Jan 26, 2012 at 11:19 AM, Christophe Fergeau
<cfergeau@xxxxxxxxxx> wrote:
> On Thu, Jan 26, 2012 at 08:18:38AM +0100, Philipp Hahn wrote:
>> Your changed version only has the same behaviour, if the user-passed-in
>> function iter_func() never changes it->next, which you can't guarentee here.
>> You need to keep the "next" copy.
>
> Yes, the for loop was changed to a while loop recently exactly for that
> purpose:

I don't get it, your commit clearly introduced a hang in Boxes and my
change fixes it back while also simplifying the code slightly. So I
don't at all buy the 'while' being more 'reliable'.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124

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