Re: [Qemu-devel] [PATCH v2 12/14] qlit: improve QLit list vs qlist comparison

2017-08-31 Thread Marc-André Lureau
Hi

- Original Message -
> Markus Armbruster  writes:
> 
> > Marc-André Lureau  writes:
> >
> >> Use QLIST_FOREACH_ENTRY() to simplify the code and break earlier.
> >>
> >> Check that the QLit list has the same size as the qlist, this should
> >> ensure that we have an exact match when iterating over qlist for
> >> comparing the elements.
> >>
> >> Signed-off-by: Marc-André Lureau 
> >
> > Reviewed-by: Markus Armbruster 
> 
> I'm updating the commit message so it continues to match the previous
> commit's message:
> 
> qlit: Tighten QLit list vs QList comparison
> 
> We check that all members of the QLit list are also in the QList.  We
> neglect to check the other direction.  Fix that.
> 
> While there, use QLIST_FOREACH_ENTRY() to simplify the code and break
> the loop on the first mismatch.
> 
> Hope that's okay with you.

Works for me, thanks a lot.



Re: [Qemu-devel] [PATCH v2 12/14] qlit: improve QLit list vs qlist comparison

2017-08-31 Thread Markus Armbruster
Markus Armbruster  writes:

> Marc-André Lureau  writes:
>
>> Use QLIST_FOREACH_ENTRY() to simplify the code and break earlier.
>>
>> Check that the QLit list has the same size as the qlist, this should
>> ensure that we have an exact match when iterating over qlist for
>> comparing the elements.
>>
>> Signed-off-by: Marc-André Lureau 
>
> Reviewed-by: Markus Armbruster 

I'm updating the commit message so it continues to match the previous
commit's message:

qlit: Tighten QLit list vs QList comparison

We check that all members of the QLit list are also in the QList.  We
neglect to check the other direction.  Fix that.

While there, use QLIST_FOREACH_ENTRY() to simplify the code and break
the loop on the first mismatch.

Hope that's okay with you.



Re: [Qemu-devel] [PATCH v2 12/14] qlit: improve QLit list vs qlist comparison

2017-08-30 Thread Markus Armbruster
Marc-André Lureau  writes:

> Use QLIST_FOREACH_ENTRY() to simplify the code and break earlier.
>
> Check that the QLit list has the same size as the qlist, this should
> ensure that we have an exact match when iterating over qlist for
> comparing the elements.
>
> Signed-off-by: Marc-André Lureau 

Reviewed-by: Markus Armbruster