[easytag] Refactor GList handling when saving Vorbis tags



commit df638532e2a0e343d97ceddd276506c95d2f25d2
Author: David King <amigadave amigadave com>
Date:   Sun Feb 23 13:06:38 2014 +0000

    Refactor GList handling when saving Vorbis tags

 src/ogg_tag.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/ogg_tag.c b/src/ogg_tag.c
index 039293b..f95f3bf 100644
--- a/src/ogg_tag.c
+++ b/src/ogg_tag.c
@@ -812,7 +812,7 @@ ogg_tag_write_file_tag (ET_File *ETFile, GError **error)
     vcedit_state   *state;
     vorbis_comment *vc;
     gchar          *string;
-    GList          *list;
+    GList *l;
     Picture        *pic;
 
     g_return_val_if_fail (ETFile != NULL && ETFile->FileTag != NULL, FALSE);
@@ -1061,12 +1061,12 @@ ogg_tag_write_file_tag (ET_File *ETFile, GError **error)
     /**************************
      * Set unsupported fields *
      **************************/
-    list = FileTag->other;
-    while (list)
+    for (l = FileTag->other; l != NULL; l = g_list_next (l))
     {
-        if (list->data)
-            vorbis_comment_add(vc,(gchar *)list->data);
-        list = list->next;
+        if (l->data)
+        {
+            vorbis_comment_add (vc, (gchar *)l->data);
+        }
     }
 
     /* Write tag to 'file' in all cases */


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