[gnome-shell] StIcon: use g_strcmp0()



commit b0e713b7758356f38ee1617945a538990330077d
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Nov 12 15:57:04 2010 -0500

    StIcon: use g_strcmp0()
    
    Simplify a check for an unchanged string with g_strcmp0().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=633865

 src/st/st-icon.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index abbab1f..2534fef 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -509,9 +509,7 @@ st_icon_set_icon_name (StIcon      *icon,
   priv = icon->priv;
 
   /* Check if there's no change */
-  if ((!priv->icon_name && !icon_name) ||
-      (priv->icon_name && icon_name &&
-       g_str_equal (priv->icon_name, icon_name)))
+  if (g_strcmp0 (priv->icon_name, icon_name) == 0)
     return;
 
   g_free (priv->icon_name);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]