[libgda] Code cleanup



commit 9cefc983c446c84bed3f6ccafebd29f9f9ed8803
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Nov 11 13:51:10 2013 +0100

    Code cleanup

 libgda/gda-config.c               |    6 ++----
 tests/data-models/check_virtual.c |    1 -
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/libgda/gda-config.c b/libgda/gda-config.c
index aafbfdb..65776ab 100644
--- a/libgda/gda-config.c
+++ b/libgda/gda-config.c
@@ -1776,10 +1776,8 @@ create_internal_provider (const gchar *path,
                        gda_log_message ("Invalid format for provider '%s' DSN spec : %s",
                                         info->id,
                                         error ? error->message : "Unknown error");
-                       if (error)
-                               g_error_free (error);
-               }
-               if (!info->dsn_params) {
+                       g_clear_error (&error);
+
                        /* there may be traces of the provider installed but some parts are missing,
                           forget about that provider... */
                        internal_provider_free (ip);
diff --git a/tests/data-models/check_virtual.c b/tests/data-models/check_virtual.c
index 6e2cf03..a51e2a4 100644
--- a/tests/data-models/check_virtual.c
+++ b/tests/data-models/check_virtual.c
@@ -164,7 +164,6 @@ test2 (void)
        g_object_unref (model);
 
        retval = TRUE;
- out:
 
        g_object_unref (city_model);
        g_object_unref (country_model);


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