On Tue, Jun 08, 2021 at 10:00:01AM +0200, Emanuele Giuseppe Esposito wrote: > > > Oh, I see - you abandon the iteration in all control flow paths, so > > > the simpler loop is still okay. Still, this confused me enough on > > > first read that it may be worth a comment, maybe: > > > > > > /* No need for _SAFE, because iteration stops on first hit */ > > > > This is a bit confusing too because it sounds like not using _SAFE is an > > optimization, but it's actually wrong (see commit message). > > > > What about: > > /* No need for _SAFE, since a different coroutine can remove another node > (not the current one) in this list, and when the current one is removed the > iteration starts back from beginning anyways. */
Works for me, although you'll have to reformat it to pass syntax check. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org