changeset 1266:df2d1c5f3786

clean up r1265 as Crazy_Hopper suggests.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sat, 14 Jul 2007 16:03:57 +0900
parents 7c6a443ac48b
children de5d238cd42a
files src/m3u/m3u.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/m3u/m3u.c	Sat Jul 14 15:30:36 2007 +0900
+++ b/src/m3u/m3u.c	Sat Jul 14 16:03:57 2007 +0900
@@ -156,16 +156,15 @@
     gchar *outstr = NULL;
     VFSFile *file;
     Playlist *playlist = playlist_get_active();
-    gchar *fn;
-    gchar *fileuri = NULL;
+    gchar *fn = NULL;
 
     g_return_if_fail(filename != NULL);
     g_return_if_fail(playlist != NULL);
 
-    fileuri = g_filename_to_uri(filename, NULL, NULL);
-    g_return_if_fail(fileuri != NULL);
-    file = vfs_fopen(fileuri, "wb");
-    g_free(fileuri); fileuri = NULL;
+    fn = g_filename_to_uri(filename, NULL, NULL);
+    g_return_if_fail(fn != NULL);
+    file = vfs_fopen(fn, "wb");
+    g_free(fn); fn = NULL;
     g_return_if_fail(file != NULL);
 
     if (cfg.use_pl_metadata)
@@ -197,8 +196,7 @@
         fn = g_filename_from_uri(entry->filename, NULL, NULL);
         vfs_fprintf(file, "%s\n", fn ? fn : entry->filename);
 
-        if (fn)
-            g_free(fn);
+        g_free(fn); fn = NULL;
     }
 
     PLAYLIST_UNLOCK(playlist->mutex);