Remove redundant checks for NULL

Remove checks for NULL before g_free() and g_clear_object().
Merge check for NULL, freeing of pointer and its setting
to NULL by g_clear_pointer().

https://bugzilla.gnome.org/show_bug.cgi?id=733157
This commit is contained in:
Marek Kasik
2014-07-14 17:02:13 +02:00
parent 07722ae2dd
commit 8b5d30d439
18 changed files with 28 additions and 95 deletions

View File

@ -902,11 +902,7 @@ gtk_numerable_icon_set_background_gicon (GtkNumerableIcon *self,
g_return_if_fail (GTK_IS_NUMERABLE_ICON (self));
if (self->priv->background_icon_name != NULL)
{
g_free (self->priv->background_icon_name);
self->priv->background_icon_name = NULL;
}
g_clear_pointer (&self->priv->background_icon_name, g_free);
res = real_set_background_icon (self, icon);