On 20/05/2016 12:26, Kevin Wolf wrote:
> Hm, we have a few instances where an iterator variable is used for
> multiple loops, so we need to be able to use it in an assignment, i.e.
> it should be a compound literal. On the other hand, I seem to remember
> that compound literals can't be used as initialisers.
> 
> Maybe a bdrv_next_iterator_reset() function then? Which would be like
> first/next, except that it doesn't return the first value yet.

What qemu/queue.h does is is provide both FOO_INITIALIZER and
FOO_INIT(&some_foo).

Thanks,

Paolo

Reply via email to