[gnome-session] presence: Simplify finalize function
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] presence: Simplify finalize function
- Date: Wed, 23 Jan 2013 15:57:29 +0000 (UTC)
commit 784163cec6883107d07c3e51ac57140b18f17d10
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 23 15:20:12 2013 +0100
presence: Simplify finalize function
https://bugzilla.gnome.org/show_bug.cgi?id=692393
gnome-session/gsm-presence.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/gnome-session/gsm-presence.c b/gnome-session/gsm-presence.c
index 13d70ba..5aa6621 100644
--- a/gnome-session/gsm-presence.c
+++ b/gnome-session/gsm-presence.c
@@ -457,15 +457,8 @@ gsm_presence_finalize (GObject *object)
presence->priv->idle_watch_id = 0;
}
- if (presence->priv->status_text != NULL) {
- g_free (presence->priv->status_text);
- presence->priv->status_text = NULL;
- }
-
- if (presence->priv->idle_monitor != NULL) {
- g_object_unref (presence->priv->idle_monitor);
- presence->priv->idle_monitor = NULL;
- }
+ g_clear_pointer (&presence->priv->status_text, g_free);
+ g_clear_object (&presence->priv->idle_monitor);
G_OBJECT_CLASS (gsm_presence_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]