On 9 Mar 2022, at 17:10, Adrian Moreno wrote:

> Multi-variable loop iterators avoid potential undefined behavior by
> using an internal iterator variable to perform the iteration and only
> referencing the containing object (via OBJECT_CONTAINING) if the
> iterator has been validated via the second expression of the for
> statement.
>
> That way, the user can easily implement a loop that never tries to
> obtain the object containing NULL or stack-allocated non-contained
> nodes.
>
> When the loop ends normally (not via "break;") the user-provided
> variable is set to NULL.
>
> Signed-off-by: Adrian Moreno <amore...@redhat.com>

Not sure if this is the patchset to start reviewing on a Friday, but I promised!

Went over the first couple of patches (more than once; I hate MACRO’s), and 
other than some small nits they look fine. I will continue the review later...

Acked-by: Eelco Chaudron <echau...@redhat.com>

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to