Minor cleanups.
authorRoman Bogorodskiy <mirrorbox@users.sourceforge.net>
Thu, 5 Jan 2006 10:01:46 +0000 (10:01 +0000)
committerRoman Bogorodskiy <mirrorbox@users.sourceforge.net>
Thu, 5 Jan 2006 10:01:46 +0000 (10:01 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@465 7f574dfc-610e-0410-a909-a81674777703

src/bmpx.c

index a2fcc30..9738c87 100644 (file)
@@ -16,7 +16,7 @@
 static DBusGConnection *bus;
 static DBusGProxy *remote_object;
 static int connected = 0;
-char unknown[8];
+static char *unknown = "unknown";
 
 void update_bmpx()
 {
@@ -79,7 +79,8 @@ void update_bmpx()
                g_hash_table_destroy(metadata);
        } else {
 fail: 
-               strcpy(unknown, "Unknown");
+               if (error)
+                       g_error_free(error);
                current_info->bmpx.title = unknown;
                current_info->bmpx.artist = unknown;
                current_info->bmpx.album = unknown;
@@ -87,4 +88,3 @@ fail:
                current_info->bmpx.track = 0;
        }
 }
-