]> Pileus Git - ~andy/gtk/commitdiff
iconhelper: small code simplification
authorSébastien Wilmet <swilmet@gnome.org>
Thu, 17 Jan 2013 13:43:35 +0000 (14:43 +0100)
committerSébastien Wilmet <swilmet@gnome.org>
Thu, 17 Jan 2013 15:21:18 +0000 (16:21 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=687025

gtk/gtkiconhelper.c

index 10ce2493dee3f6f534aab929cdc6d73f5a7be474..37ba5811c81b476c7287c3f6da69f8183fe9a3f3 100644 (file)
@@ -413,7 +413,7 @@ _gtk_icon_helper_set_icon_name (GtkIconHelper *self,
   _gtk_icon_helper_clear (self);
 
   if (icon_name != NULL &&
-      g_strcmp0 (icon_name, "") != 0)
+      icon_name[0] != '\0')
     {
       self->priv->storage_type = GTK_IMAGE_ICON_NAME;
       self->priv->icon_name = g_strdup (icon_name);
@@ -470,7 +470,7 @@ _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
   _gtk_icon_helper_clear (self);
 
   if (stock_id != NULL &&
-      g_strcmp0 (stock_id, "") != 0)
+      stock_id[0] != '\0')
     {
       self->priv->storage_type = GTK_IMAGE_STOCK;
       self->priv->stock_id = g_strdup (stock_id);