summaryrefslogtreecommitdiff
path: root/gtk/gtktoolitem.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-03-09 21:57:37 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-03-09 21:57:37 +0000
commit82ce59cd0fd65f4d3b13dc4c305fc6d8ec44a12c (patch)
tree59d060f22217bda52a711dbada1b7c771ddca617 /gtk/gtktoolitem.c
parenta1e455446281f6a6a1a4eac14cd064cd9cfa93a7 (diff)
downloadgtk+-82ce59cd0fd65f4d3b13dc4c305fc6d8ec44a12c.tar.gz
Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09 Matthias Clasen <mclasen@redhat.com> * Everywhere: Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder, Djihed Afifi) * configure.in: Check for ftw.h svn path=/trunk/; revision=17444
Diffstat (limited to 'gtk/gtktoolitem.c')
-rw-r--r--gtk/gtktoolitem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index 2bd8370ce8..d82a66b147 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -254,8 +254,7 @@ gtk_tool_item_finalize (GObject *object)
{
GtkToolItem *item = GTK_TOOL_ITEM (object);
- if (item->priv->menu_item_id)
- g_free (item->priv->menu_item_id);
+ g_free (item->priv->menu_item_id);
if (item->priv->menu_item)
g_object_unref (item->priv->menu_item);
@@ -1068,8 +1067,7 @@ gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item,
g_return_if_fail (menu_item == NULL || GTK_IS_MENU_ITEM (menu_item));
g_return_if_fail (menu_item_id != NULL);
- if (tool_item->priv->menu_item_id)
- g_free (tool_item->priv->menu_item_id);
+ g_free (tool_item->priv->menu_item_id);
tool_item->priv->menu_item_id = g_strdup (menu_item_id);