[gedit] Avoid uninitialized var in last commit.



commit c4f05b6dd65723317093c1602f4bd6637b8c8245
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Aug 23 13:45:39 2015 +0200

    Avoid uninitialized var in last commit.
    
    Spotted by Sébastien

 gedit/gedit-commands-file.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 7d3d9d1..aa0238c 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -773,12 +773,15 @@ static GtkFileChooserConfirmation
 confirm_overwrite_callback (GeditFileChooserDialog *dialog,
                            gpointer                data)
 {
+       GtkFileChooserConfirmation res;
        GFile *file;
        GFileInfo *info;
-       GtkFileChooserConfirmation res;
 
        gedit_debug (DEBUG_COMMANDS);
 
+       /* fall back to the default confirmation dialog */
+       res = GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM;
+
        file = gedit_file_chooser_dialog_get_file (dialog);
 
        info = g_file_query_info (file,
@@ -808,11 +811,6 @@ confirm_overwrite_callback (GeditFileChooserDialog *dialog,
 
                g_object_unref (info);
        }
-       else
-       {
-               /* fall back to the default confirmation dialog */
-               res = GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM;
-       }
 
        g_object_unref (file);
 


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