[Top][All Lists]
[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).
- [Qemu-devel] [PATCH v2 00/15]: Initial QObject conversion, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 02/15] Introduce QList, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 01/15] QObject: Accept NULL, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 03/15] Introduce QList unit-tests, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 04/15] monitor: Add user_print() to mon_cmd_t, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 05/15] monitor: Handle new and old style handlers, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 06/15] monitor: do_info(): handle new and old info handlers, Luiz Capitulino, 2009/10/06
- [Qemu-devel] [PATCH 07/15] monitor: Convert do_quit() do QObject, Luiz Capitulino, 2009/10/06