aboutsummaryrefslogtreecommitdiff
path: root/src/notifier.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-07-24 15:17:32 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-07-24 15:17:32 -0500
commit62a35de9ca05c71d98680b1e49c2c345a498acda (patch)
tree0b60253a7d8ad9f11f77b7bc0491634b771388a6 /src/notifier.c
parent11784e2e354b5538b6fbccd9df1e6259c9ebc6f0 (diff)
downloadayatana-indicator-power-62a35de9ca05c71d98680b1e49c2c345a498acda.tar.gz
ayatana-indicator-power-62a35de9ca05c71d98680b1e49c2c345a498acda.tar.bz2
ayatana-indicator-power-62a35de9ca05c71d98680b1e49c2c345a498acda.zip
check the return value of g_dbus_interface_skeleton_export() directly instead of indirectly testing to see if the GError it used is nonnull.
Diffstat (limited to 'src/notifier.c')
-rw-r--r--src/notifier.c9
1 files 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);