[gnome-todo] style fixes



commit 0e5e8a0559698d660c33ef5b9297589c856bef2c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jun 24 16:13:56 2015 -0300

    style fixes

 src/gtd-task.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gtd-task.c b/src/gtd-task.c
index 442fe52..ec23c92 100644
--- a/src/gtd-task.c
+++ b/src/gtd-task.c
@@ -506,8 +506,7 @@ gtd_task_get_description (GtdTask *task)
 
   if (g_strcmp0 (task->priv->description, desc) != 0)
     {
-      if (task->priv->description)
-        g_free (task->priv->description);
+      g_clear_pointer (&task->priv->description, g_free);
 
       task->priv->description = g_strdup (desc);
     }
@@ -540,12 +539,13 @@ gtd_task_set_description (GtdTask     *task,
       GSList note;
       ECalComponentText text;
 
-      if (task->priv->description)
-        g_free (task->priv->description);
+      g_clear_pointer (&task->priv->description, g_free);
 
       task->priv->description = g_strdup (description);
+
       text.value = task->priv->description;
       text.altrep = NULL;
+
       note.data = &text;
       note.next = NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]