changeset 4627:a7392e85d4c6

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 11 Jun 2008 13:08:58 +0300
parents a615322374c8
children 8399067f9b1a
files src/audacious/util.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/util.c	Fri Jun 06 15:37:29 2008 +0300
+++ b/src/audacious/util.c	Wed Jun 11 13:08:58 2008 +0300
@@ -995,18 +995,16 @@
     // case 1: filename is raw full path or uri
     if (filename[0] == '/' || strstr(filename, "://")) {
         uri = g_filename_to_uri(filename, NULL, NULL);
-        if(!uri) {
+        if(!uri)
             uri = g_strdup(filename);
-        }
         g_free(filename);
     }
     // case 2: filename is not raw full path nor uri, playlist path is full path
     // make full path by replacing last part of playlist path with filename. (using g_build_filename)
     else if (playlist_name[0] == '/' || strstr(playlist_name, "://")) {
         path = g_filename_from_uri(playlist_name, NULL, NULL);
-        if (!path) {
+        if (!path)
             path = g_strdup(playlist_name);
-        }
         tmp = strrchr(path, '/'); *tmp = '\0';
         tmp = g_build_filename(path, filename, NULL);
         g_free(path); g_free(filename);
@@ -1017,7 +1015,7 @@
     // just abort.
     else {
         g_free(filename);
-        return NULL;
+        uri = NULL;
     }
 
     AUDDBG("uri=%s\n", uri);