changeset 1966:f85a079573c3

More slight cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 02 Oct 2007 19:19:29 +0300
parents 41d726acb915
children 10705f679abe
files src/xspf/xspf.c
diffstat 1 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/xspf/xspf.c	Tue Oct 02 19:17:46 2007 +0300
+++ b/src/xspf/xspf.c	Tue Oct 02 19:19:29 2007 +0300
@@ -385,13 +385,11 @@
             gint tmplen = 0;
 
             if (!is_uri(entry->filename)) { //obsolete
-                gchar *tmp2;
-                tmp2 = g_path_get_dirname(entry->filename);
+                gchar *tmp2 = g_path_get_dirname(entry->filename);
                 tmp = g_strdup_printf("%s/", tmp2);
                 g_free(tmp2);
-            } else {
+            } else
                 tmp = g_strdup(entry->filename);
-            }
 
             if (!base) {
                 base = strdup(tmp);
@@ -414,10 +412,8 @@
                 base = tmp;
                 baselen = tmplen;
                 XSDEBUG("base='%s', baselen=%d\n", base, baselen);
-            }
-            else {
+            } else
                 g_free(tmp);
-            }
         }
         
         /* set base URI */
@@ -436,8 +432,7 @@
                 tmp = g_strdup_printf("file://%s", base);
                 xmlSetProp(rootnode, (xmlChar *)"xml:base", (xmlChar *)tmp);
                 g_free(tmp);
-            }
-            else
+            } else
                 xmlSetProp(rootnode, (xmlChar *)"xml:base", (xmlChar *)base);
         }
     }                           /* USE_RELATIVE */
@@ -482,8 +477,7 @@
         if (is_uri(entry->filename)) {   /* uri */
             XSDEBUG("filename is uri\n");
             filename = g_strdup(entry->filename + baselen); // entry->filename is always uri now.
-        }
-        else {                  /* local file (obsolete) */
+        } else {                  /* local file (obsolete) */
             gchar *tmp = (gchar *) xspf_path_to_uri((const xmlChar *)entry->filename + baselen);
             if (base) { /* relative */
                 filename = g_strdup_printf("%s", tmp);