summaryrefslogtreecommitdiff
path: root/src/console-kit.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2011-09-07 14:44:18 +1000
committerRobert Ancell <robert.ancell@canonical.com>2011-09-07 14:44:18 +1000
commitfb902eabe00a24b9b6bb991191e15cd6967c812a (patch)
tree90330bd9f65b7449c0a7efaeac8b59c73b67563c /src/console-kit.c
parent6f513aa004948ba3663f7b85e71c81e587f73c1c (diff)
downloadlightdm-git-fb902eabe00a24b9b6bb991191e15cd6967c812a.tar.gz
Tidy up ConsoleKit code
Diffstat (limited to 'src/console-kit.c')
-rw-r--r--src/console-kit.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/console-kit.c b/src/console-kit.c
index 7cdba757..0faedbd5 100644
--- a/src/console-kit.c
+++ b/src/console-kit.c
@@ -19,21 +19,21 @@ static GDBusProxy *ck_proxy = NULL;
static gboolean
load_ck_proxy (void)
{
- GError *error = NULL;
-
- if (ck_proxy)
- return TRUE;
-
- ck_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
- G_DBUS_PROXY_FLAGS_NONE,
- NULL,
- "org.freedesktop.ConsoleKit",
- "/org/freedesktop/ConsoleKit/Manager",
- "org.freedesktop.ConsoleKit.Manager",
- NULL, &error);
if (!ck_proxy)
- g_warning ("Unable to get connection to ConsoleKit: %s", error->message);
- g_clear_error (&error);
+ {
+ GError *error = NULL;
+ ck_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ "org.freedesktop.ConsoleKit",
+ "/org/freedesktop/ConsoleKit/Manager",
+ "org.freedesktop.ConsoleKit.Manager",
+ NULL, &error);
+ if (!ck_proxy)
+ g_warning ("Unable to get connection to ConsoleKit: %s", error->message);
+ g_clear_error (&error);
+ }
+
return ck_proxy != NULL;
}