qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 1/7] qom: introduce ObjectPropertyIterator st


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 1/7] qom: introduce ObjectPropertyIterator struct for iteration
Date: Tue, 17 Nov 2015 16:35:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Daniel P. Berrange" <address@hidden> writes:

> On Tue, Nov 17, 2015 at 04:25:22PM +0100, Markus Armbruster wrote:
>> I apologize for the lateness of my review.
>
>> > +void object_property_iter_free(ObjectPropertyIterator *iter)
>> > +{
>> > +    if (!iter) {
>> > +        return;
>> > +    }
>> > +    g_free(iter);
>> 
>> g_free(NULL) is perfectly safe; please drop the conditional.
>
> The next patch in the series has to free some fields in 'iter'
> so the check for NULL upfront is not redundant.

I'd add the conditional when it's actually needed, not least to avoid
comments from picky reviewers like myself ;)  Anyway, not worth a respin
by itself.

However, I'd very much prefer the iterators to follow precedence in the
tree.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]