qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 02/15] Introduce QList


From: Luiz Capitulino
Subject: [Qemu-devel] Re: [PATCH 02/15] Introduce QList
Date: Wed, 7 Oct 2009 09:48:38 -0300

On Tue, 06 Oct 2009 20:37:43 -0500
Anthony Liguori <address@hidden> wrote:

> Luiz Capitulino wrote:

[...]

> > +/**
> > + * qlist_destroy_obj(): Free all the memory allocated by a QList
> > + */
> > +static void qlist_destroy_obj(QObject *obj)
> > +{
> > +    QList *qlist;
> > +    QListEntry *entry, *next_entry;
> > +
> > +    assert(obj != NULL);
> >   
> 
> Usually accepting NULL in a free function makes for nicer exit paths in 
> function.

 The destroy_obj() functions are always called by qobject_decref()
and it will never pass a NULL qobject.

 But qobject_decref() accepts NULL.

 I've applied the other changes, some of them also need to be done
in the others data types (will send patches).




reply via email to

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