* David Stevenson, ([EMAIL PROTECTED]) napisał:
> Hi,
> (...)
> 2)
> Also, I was wondering if the idea behind the "for (l = list; l; l =
> l->next)" is to avoid deferencing pointers in the condition each time
> through the loop? This seems OK in evas_object_list_find, but as for
> evas_object_list_append, we have:
>
> if (list->last) l = list->last;
> else for (l = list; l; l = l->next);
> l->next = new_l;
U R absolutely right
probably this was never found as bug because else is never reached :>
but for safety this should be changed to
else for (l = list; l->next; l = l->next);
same thing in evas_list_append:
for (l = list; l; l = l->next)
{
if (!l->next)
{
l->next = new_l;
new_l->prev = l;
list->last = new_l;
list->count++;
return list;
}
}
should use previous construction or should be changed to something like:
for (l = list; l->next; l = l->next);
l->next = new_l;
...
in same function three times usage of "return list" is baaad idea :)
there should remain only last "return list"...
(btw. what a terrible code :)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel