[libwnck] [misc] Use g_strcmp0 instead of local convenience function
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Subject: [libwnck] [misc] Use g_strcmp0 instead of local convenience function
- Date: Tue, 16 Jun 2009 17:57:37 -0400 (EDT)
commit bc3a580efc3801daf58332cd1fa2eec3a829255d
Author: Vincent Untz <vuntz gnome org>
Date: Mon Jun 15 22:54:05 2009 +0200
[misc] Use g_strcmp0 instead of local convenience function
libwnck/window.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/libwnck/window.c b/libwnck/window.c
index 767d547..73a9588 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -2745,15 +2745,6 @@ update_state (WnckWindow *window)
}
}
-static gboolean
-nullstr_equal (const char *str1, const char *str2)
-{
- if (str1 == NULL || str2 == NULL)
- return str1 == str2;
- else
- return !strcmp (str1, str2);
-}
-
static void
update_name (WnckWindow *window)
{
@@ -2766,7 +2757,7 @@ update_name (WnckWindow *window)
new_name = _wnck_get_name (window->priv->xwindow);
- if (!nullstr_equal (window->priv->name, new_name))
+ if (g_strcmp0 (window->priv->name, new_name) != 0)
window->priv->need_emit_name_changed = TRUE;
g_free (window->priv->name);
@@ -2785,7 +2776,7 @@ update_icon_name (WnckWindow *window)
new_name = _wnck_get_icon_name (window->priv->xwindow);
- if (!nullstr_equal (window->priv->icon_name, new_name))
+ if (g_strcmp0 (window->priv->icon_name, new_name) != 0)
window->priv->need_emit_name_changed = TRUE;
g_free (window->priv->icon_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]