changeset 35520:ecbaf301748f

Don't unnecessarily use global MPlayer variable filename in Win32 GUI. Use a local variable instead. (This has been forgotten in r35613.)
author ib
date Wed, 05 Dec 2012 23:12:53 +0000
parents 7f1be403a640
children baf53d200292
files gui/win32/interface.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/win32/interface.c	Wed Dec 05 22:55:02 2012 +0000
+++ b/gui/win32/interface.c	Wed Dec 05 23:12:53 2012 +0000
@@ -845,6 +845,7 @@
 int guiPlaylist (int what, play_tree_t *playtree, m_config_t *config, int enqueue)
 {
     play_tree_iter_t *pt_iter = NULL;
+    char *file;
     int added = FALSE;
 
     switch (what)
@@ -858,11 +859,11 @@
 
             if((pt_iter = pt_iter_create(&playtree, config)))
             {
-                while ((filename = pt_iter_get_next_file(pt_iter)) != NULL)
+                while ((file = pt_iter_get_next_file(pt_iter)) != NULL)
                 {
-                    if (parse_filename(filename, playtree, config, 0))
+                    if (parse_filename(file, playtree, config, 0))
                         added = TRUE;
-                    else if (import_file_into_gui(filename, 0)) /* Add it to end of list */
+                    else if (import_file_into_gui(file, 0)) /* Add it to end of list */
                         added = TRUE;
                 }
             }
@@ -885,8 +886,8 @@
 
             if((pt_iter = pt_iter_create(&playtree, config)))
             {
-                while ((filename = pt_iter_get_next_file(pt_iter)) != NULL)
-                    if (import_file_into_gui(filename, 1)) /* insert it into the list and set plCurrent = new item */
+                while ((file = pt_iter_get_next_file(pt_iter)) != NULL)
+                    if (import_file_into_gui(file, 1)) /* insert it into the list and set plCurrent = new item */
                         added = TRUE;
                 pt_iter_destroy(&pt_iter);
             }