[gthumb/gthumb-2-12] initialize error to NULL
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-12] initialize error to NULL
- Date: Tue, 28 Dec 2010 13:13:37 +0000 (UTC)
commit 3e09c1d09e79b2b48f53ffb0edd635054c825132
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Dec 28 14:09:54 2010 +0100
initialize error to NULL
extensions/catalogs/actions.c | 2 +-
extensions/catalogs/dlg-add-to-catalog.c | 2 +-
gthumb/gconf-utils.c | 8 +++-----
gthumb/gth-overwrite-dialog.c | 2 +-
4 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/extensions/catalogs/actions.c b/extensions/catalogs/actions.c
index 7538049..6e4a16e 100644
--- a/extensions/catalogs/actions.c
+++ b/extensions/catalogs/actions.c
@@ -181,7 +181,7 @@ gth_browser_activate_action_catalog_new (GtkAction *action,
GFile *parent;
GthFileSource *file_source;
GFile *gio_parent;
- GError *error;
+ GError *error = NULL;
GFile *gio_file;
name = _gtk_request_dialog_run (GTK_WINDOW (browser),
diff --git a/extensions/catalogs/dlg-add-to-catalog.c b/extensions/catalogs/dlg-add-to-catalog.c
index 94038cb..f622421 100644
--- a/extensions/catalogs/dlg-add-to-catalog.c
+++ b/extensions/catalogs/dlg-add-to-catalog.c
@@ -257,7 +257,7 @@ new_catalog_button_clicked_cb (GtkWidget *widget,
GthFileData *selected_parent;
GFile *parent;
GFile *gio_parent;
- GError *error;
+ GError *error = NULL;
GFile *gio_file;
name = _gtk_request_dialog_run (GTK_WINDOW (data->dialog),
diff --git a/gthumb/gconf-utils.c b/gthumb/gconf-utils.c
index 7ecde24..f6e242c 100644
--- a/gthumb/gconf-utils.c
+++ b/gthumb/gconf-utils.c
@@ -400,14 +400,13 @@ eel_gconf_set_string_list (const char *key,
const GSList *slist)
{
GConfClient *client;
- GError *error;
+ GError *error = NULL;
g_return_if_fail (key != NULL);
client = eel_gconf_client_get_global ();
g_return_if_fail (client != NULL);
- error = NULL;
gconf_client_set_list (client, key, GCONF_VALUE_STRING,
/* Need cast cause of GConf api bug */
(GSList *) slist,
@@ -419,16 +418,15 @@ eel_gconf_set_string_list (const char *key,
GSList *
eel_gconf_get_string_list (const char *key)
{
- GSList *slist;
+ GSList *slist;
GConfClient *client;
- GError *error;
+ GError *error = NULL;
g_return_val_if_fail (key != NULL, NULL);
client = eel_gconf_client_get_global ();
g_return_val_if_fail (client != NULL, NULL);
- error = NULL;
slist = gconf_client_get_list (client, key, GCONF_VALUE_STRING, &error);
if (eel_gconf_handle_error (&error)) {
slist = NULL;
diff --git a/gthumb/gth-overwrite-dialog.c b/gthumb/gth-overwrite-dialog.c
index 179deb8..607a2ac 100644
--- a/gthumb/gth-overwrite-dialog.c
+++ b/gthumb/gth-overwrite-dialog.c
@@ -123,7 +123,7 @@ image_loader_ready_cb (GObject *source_object,
gpointer user_data)
{
GthOverwriteDialog *self = user_data;
- GError *error;
+ GError *error = NULL;
GdkPixbuf *pixbuf;
GtkWidget *viewer;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]