From 62a35de9ca05c71d98680b1e49c2c345a498acda Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 24 Jul 2014 15:17:32 -0500 Subject: check the return value of g_dbus_interface_skeleton_export() directly instead of indirectly testing to see if the GError it used is nonnull. --- src/notifier.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/notifier.c b/src/notifier.c index c091f73..30285d3 100644 --- a/src/notifier.c +++ b/src/notifier.c @@ -438,11 +438,10 @@ indicator_power_notifier_set_bus (IndicatorPowerNotifier * self, p->bus = g_object_ref (bus); error = NULL; - g_dbus_interface_skeleton_export(skel, - bus, - BUS_PATH"/Battery", - &error); - if (error != NULL) + if (!g_dbus_interface_skeleton_export(skel, + bus, + BUS_PATH"/Battery", + &error)) { g_warning ("Unable to export LowBattery properties: %s", error->message); g_error_free (error); -- cgit v1.2.3