summaryrefslogtreecommitdiff
path: root/gtk/gtkrc.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/gtkrc.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/gtkrc.c')
-rw-r--r--gtk/gtkrc.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index 7853b29294..f5cecc397d 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -1166,14 +1166,12 @@ gtk_rc_style_finalize (GObject *object)
rc_style = GTK_RC_STYLE (object);
rc_priv = GTK_RC_STYLE_GET_PRIVATE (rc_style);
- if (rc_style->name)
- g_free (rc_style->name);
+ g_free (rc_style->name);
if (rc_style->font_desc)
pango_font_description_free (rc_style->font_desc);
for (i = 0; i < 5; i++)
- if (rc_style->bg_pixmap_name[i])
- g_free (rc_style->bg_pixmap_name[i]);
+ g_free (rc_style->bg_pixmap_name[i]);
/* Now remove all references to this rc_style from
* realized_style_ht
@@ -3039,8 +3037,7 @@ gtk_rc_parse_style (GtkRcContext *context,
for (i = 0; i < 5; i++)
{
- if (rc_style->bg_pixmap_name[i])
- g_free (rc_style->bg_pixmap_name[i]);
+ g_free (rc_style->bg_pixmap_name[i]);
rc_style->bg_pixmap_name[i] = g_strdup (parent_style->bg_pixmap_name[i]);
}
}
@@ -3395,8 +3392,7 @@ gtk_rc_parse_bg_pixmap (GtkRcContext *context,
if (pixmap_file)
{
- if (rc_style->bg_pixmap_name[state])
- g_free (rc_style->bg_pixmap_name[state]);
+ g_free (rc_style->bg_pixmap_name[state]);
rc_style->bg_pixmap_name[state] = pixmap_file;
}
@@ -4051,8 +4047,7 @@ gtk_rc_parse_im_module_file (GScanner *scanner)
if (token != G_TOKEN_STRING)
return G_TOKEN_STRING;
- if (im_module_file)
- g_free (im_module_file);
+ g_free (im_module_file);
im_module_file = g_strdup (scanner->value.v_string);