[ovs-dev] [PATCH] hmap: Ensure iterator is NULL after iteration.

Ben Pfaff blp at nicira.com
Fri Aug 21 21:25:58 UTC 2015

On Tue, Aug 18, 2015 at 11:43:18AM -0700, Russell Bryant wrote:
> The HMAP_FOR_EACH_()* macros had a usability issue where the iterator
> was only NULL at the completion of iteration if the hmap_node was the
> first struct member.  This change ensures that the iterator is set to
> NULL when iteration ends normally without a 'break'.
> Signed-off-by: Russell Bryant <rbryant at redhat.com>

I applied this, thanks.

Let's try to keep in mind that this could cause nightmarishly subtle
bugs for backporting: if a bug fix takes advantage of this new behavior,
a backport of that bug fix needs to avoid it.

More information about the dev mailing list