[PATCH] core: reset GList pointers to NULL when necessary

Aleksander Morgado aleksander at aleksander.es
Wed Mar 29 08:15:54 UTC 2017


On Wed, Mar 29, 2017 at 8:28 AM, Ben Chan <benchan at chromium.org> wrote:
> btw, the g_list_free_full implementation seems to handle a NULL GList
> argument, but the glib doc doesn't explicitly mention that.  I wonder if
> it's better to add `if (glist_ptr)` check anyway.

The extra if() is not needed, because NULL is a perfectly valid list (empty).

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list