aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2009-09-23 23:21:21 -0500
committerCody Russell <crussell@canonical.com>2009-09-23 23:21:21 -0500
commit2bb61203e78626f51bdbfbc8fb1440a046bab7be (patch)
treee1bf84b88ca002ff6885f6221ae87caac1bdd656 /src
parentf8e0ff04840fe4842c5c3ebeef396b530d6f1995 (diff)
downloadayatana-indicator-session-2bb61203e78626f51bdbfbc8fb1440a046bab7be.tar.gz
ayatana-indicator-session-2bb61203e78626f51bdbfbc8fb1440a046bab7be.tar.bz2
ayatana-indicator-session-2bb61203e78626f51bdbfbc8fb1440a046bab7be.zip
use g_strcmp0
Diffstat (limited to 'src')
-rw-r--r--src/users-service-dbus.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 499182b..96f5cd5 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -443,18 +443,6 @@ get_unix_user (UsersServiceDbus *service,
return TRUE;
}
-static gint
-session_compare (const gchar *a,
- const gchar *b)
-{
- if (a == NULL)
- return 1;
- else if (b == NULL)
- return -1;
-
- return strcmp (a, b);
-}
-
static gchar *
get_session_for_user (UsersServiceDbus *service,
UserData *user)
@@ -549,7 +537,7 @@ do_add_session (UsersServiceDbus *service,
g_strdup (ssid),
g_strdup (user->user_name));
- l = g_list_find_custom (user->sessions, ssid, (GCompareFunc)session_compare);
+ l = g_list_find_custom (user->sessions, ssid, (GCompareFunc)g_strcmp0);
if (l == NULL)
{
g_debug ("Adding session %s", ssid);
@@ -656,7 +644,7 @@ seat_proxy_session_removed (DBusGProxy *seat_proxy,
l = g_list_find_custom (user->sessions,
session_id,
- (GCompareFunc)session_compare);
+ (GCompareFunc)g_strcmp0);
if (l)
{
g_debug ("Removing session %s", session_id);