[easytag/wip/glist: 9/9] Refactor list handling in flac_tag.c



commit 3fa6dbdde9ab9bae603da28965402370b2b72d59
Author: David King <amigadave amigadave com>
Date:   Mon May 27 20:09:46 2013 +0100

    Refactor list handling in flac_tag.c

 src/flac_tag.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/flac_tag.c b/src/flac_tag.c
index 1b4110b..41b13c1 100644
--- a/src/flac_tag.c
+++ b/src/flac_tag.c
@@ -891,7 +891,7 @@ gboolean Flac_Tag_Write_File_Tag (ET_File *ETFile)
     //
     {
         FLAC__StreamMetadata *vc_block; // For vorbis comments
-        GList *list;
+        GList *l;
         
         // Allocate a block for Vorbis comments
         vc_block = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
@@ -981,11 +981,9 @@ gboolean Flac_Tag_Write_File_Tag (ET_File *ETFile)
         /**************************
          * Set unsupported fields *
          **************************/
-        list = FileTag->other;
-        while (list)
+        for (l = FileTag->other; l != NULL; l = g_list_next (l))
         {
-            Flac_Set_Tag(vc_block, "", (gchar*)list->data, FALSE);
-            list = list->next;
+            Flac_Set_Tag (vc_block, "", (gchar *)l->data, FALSE);
         }
 
         // Add the block to the the chain (so we don't need to free the block)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]