[gtksourceview] tests: use g_clear_error()



commit d13c0b2c358b2365994c941a8930163524264831
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Jun 13 11:49:35 2016 +0200

    tests: use g_clear_error()

 tests/test-search.c |    2 +-
 tests/test-widget.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-search.c b/tests/test-search.c
index 959562d..5c62598 100644
--- a/tests/test-search.c
+++ b/tests/test-search.c
@@ -147,7 +147,7 @@ update_label_regex_error (TestSearch *search)
        {
                gtk_label_set_text (search->priv->label_regex_error, error->message);
                gtk_widget_show (GTK_WIDGET (search->priv->label_regex_error));
-               g_error_free (error);
+               g_clear_error (&error);
        }
 }
 
diff --git a/tests/test-widget.c b/tests/test-widget.c
index 161670e..544a075 100644
--- a/tests/test-widget.c
+++ b/tests/test-widget.c
@@ -227,7 +227,7 @@ load_cb (GtkSourceFileLoader *loader,
        if (error != NULL)
        {
                g_warning ("Error while loading the file: %s", error->message);
-               g_error_free (error);
+               g_clear_error (&error);
                g_clear_object (&self->priv->file);
                goto end;
        }


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