$NetBSD: patch-bd,v 1.1 2005/12/18 21:03:46 rillig Exp $

Keywords: c90

--- src/itdb_itunesdb.c.orig	Sat Jul 16 09:13:50 2005
+++ src/itdb_itunesdb.c	Sun Dec 18 21:59:37 2005
@@ -477,9 +477,10 @@ static gunichar2 *fixup_big_utf16 (gunic
  * return value after use */
 static struct playcount *playcount_get_next (FImport *fimp)
 {
-    g_return_val_if_fail (fimp, NULL);
+    struct playcount *playcount;
 
-    struct playcount *playcount = g_list_nth_data (fimp->playcounts, 0);
+    g_return_val_if_fail (fimp, NULL);
+    playcount = g_list_nth_data (fimp->playcounts, 0);
 
     if (playcount)
 	fimp->playcounts = g_list_remove (fimp->playcounts, playcount);
@@ -1780,8 +1781,10 @@ static gboolean parse_fimp (FImport *fim
 	{   /* We just check if it's actually a playlist mhsd (type=2)
 	       or not (type = 1, should not be...) */
 	    guint32 len = get32lint (cts, seek+8);
+	    guint32 type;
+
 	    CHECK_ERROR (fimp, FALSE);
-	    guint32 type = get32lint (cts, seek+12);
+	    type = get32lint (cts, seek+12);
 	    CHECK_ERROR (fimp, FALSE);
 	    if (type != 2)
 	    {  /* this is not a playlist MHSD -> skip it */
