[gnome-settings-daemon] power: Simplify GVariant unref
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Simplify GVariant unref
- Date: Tue, 19 Apr 2016 12:07:20 +0000 (UTC)
commit cc43329fdcbea1dcfe2bd17a7b909bb8c666548c
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 19 13:59:36 2016 +0200
power: Simplify GVariant unref
plugins/power/gsd-power-manager.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 5594320..5a3eb81 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2539,10 +2539,8 @@ iio_proxy_changed (GsdPowerManager *manager)
}
manager->priv->ambient_percentage_old = pc;
out:
- if (val_has != NULL)
- g_variant_unref (val_has);
- if (val_als != NULL)
- g_variant_unref (val_als);
+ g_clear_pointer (&val_has, g_variant_unref);
+ g_clear_pointer (&val_als, g_variant_unref);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]