[gnome-commander/Implement_CppCheck_suggestions] Decrease the scope of the result variable



commit f2879475cdc4cf23e455ae306efcbe4a476d6b2b
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Tue Mar 12 23:05:29 2019 +0100

    Decrease the scope of the result variable

 src/dialogs/gnome-cmd-mkdir-dialog.cc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-mkdir-dialog.cc b/src/dialogs/gnome-cmd-mkdir-dialog.cc
index 1e780681..4fc4b94c 100644
--- a/src/dialogs/gnome-cmd-mkdir-dialog.cc
+++ b/src/dialogs/gnome-cmd-mkdir-dialog.cc
@@ -104,15 +104,13 @@ static void response_callback (GtkDialog *dialog, int response_id, GnomeCmdDir *
                     // the list of uri's to be created
                     GSList *uri_list = make_uri_list (dir, filename);
 
-                    GnomeVFSResult result = GNOME_VFS_OK;
-
                     guint perm = ((GNOME_VFS_PERM_USER_ALL | GNOME_VFS_PERM_GROUP_ALL | 
GNOME_VFS_PERM_OTHER_ALL) & ~gnome_cmd_data.umask ) | GNOME_VFS_PERM_USER_WRITE | GNOME_VFS_PERM_USER_EXEC;
 
                     for (GSList *i = uri_list; i; i = g_slist_next (i))
                     {
                         GnomeVFSURI *mkdir_uri = (GnomeVFSURI *) i->data;
 
-                        result = gnome_vfs_make_directory_for_uri (mkdir_uri, perm);
+                        auto result = gnome_vfs_make_directory_for_uri (mkdir_uri, perm);
 
                         if (result!=GNOME_VFS_OK)
                         {


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