diff options
author | Ted Gould <ted@canonical.com> | 2009-04-07 13:18:14 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-04-07 13:18:14 -0500 |
commit | 81194efc2e8b54fe3ab25604981ac03f4ad0bb4d (patch) | |
tree | 44fad6359c23ca3d185cccc8b0a8f5e968ff3db9 /src/indicator-messages.c | |
parent | 33aaf28aafac744cde4375df44db4bd1c9a02696 (diff) | |
download | ayatana-indicator-messages-81194efc2e8b54fe3ab25604981ac03f4ad0bb4d.tar.gz ayatana-indicator-messages-81194efc2e8b54fe3ab25604981ac03f4ad0bb4d.tar.bz2 ayatana-indicator-messages-81194efc2e8b54fe3ab25604981ac03f4ad0bb4d.zip |
Should have been using g_strcmp0 all along. No reason not to use the safer one.
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 66519f4..5d7084e 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -98,7 +98,7 @@ imList_equal (gconstpointer a, gconstpointer b) g_debug("\tComparing (%s %d) to (%s %d)", pas, pai, pbs, pbi); - return !((!strcmp(pas, pbs)) && (pai == pbi)); + return !((!g_strcmp0(pas, pbs)) && (pai == pbi)); } static gint @@ -327,7 +327,7 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica return; } - if (property == NULL || strcmp(property, "subtype")) { + if (property == NULL || g_strcmp0(property, "subtype")) { /* We should only ever get subtypes, but just in case */ g_warning("Subtype callback got a property '%s'", property); return; @@ -342,13 +342,13 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica g_debug("Message subtype: %s", propertydata); - if (!strcmp(propertydata, "im") || !strcmp(propertydata, "login")) { + if (!g_strcmp0(propertydata, "im") || !g_strcmp0(propertydata, "login")) { imList_t * listItem = g_new0(imList_t, 1); listItem->server = server; listItem->indicator = indicator; g_debug("Building IM Item"); - ImMenuItem * menuitem = im_menu_item_new(listener, server, indicator, !strcmp(propertydata, "im")); + ImMenuItem * menuitem = im_menu_item_new(listener, server, indicator, !g_strcmp0(propertydata, "im")); g_object_ref(G_OBJECT(menuitem)); listItem->menuitem = GTK_WIDGET(menuitem); @@ -396,7 +396,7 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica static void indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) { - if (type == NULL || strcmp(type, "message")) { + if (type == NULL || g_strcmp0(type, "message")) { /* We only care about message type indicators all of the others can go to the bit bucket */ g_debug("Ignoreing indicator of type '%s'", type); @@ -412,7 +412,7 @@ static void indicator_removed (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) { g_debug("Removing %s %d", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator)); - if (type == NULL || strcmp(type, "message")) { + if (type == NULL || g_strcmp0(type, "message")) { /* We only care about message type indicators all of the others can go to the bit bucket */ g_debug("Ignoreing indicator of type '%s'", type); |