StIcon: use g_strcmp0()

Simplify a check for an unchanged string with g_strcmp0().

https://bugzilla.gnome.org/show_bug.cgi?id=633865
This commit is contained in:
Owen W. Taylor 2010-11-12 15:57:04 -05:00
parent 32fc25a3ac
commit b0e713b775

View File

@ -509,9 +509,7 @@ st_icon_set_icon_name (StIcon *icon,
priv = icon->priv; priv = icon->priv;
/* Check if there's no change */ /* Check if there's no change */
if ((!priv->icon_name && !icon_name) || if (g_strcmp0 (priv->icon_name, icon_name) == 0)
(priv->icon_name && icon_name &&
g_str_equal (priv->icon_name, icon_name)))
return; return;
g_free (priv->icon_name); g_free (priv->icon_name);