From: Andre Noll <maan@tuebingen.mpg.de>
Date: Tue, 13 May 2025 21:44:41 +0000 (+0200)
Subject: mp3_afh: Kill FOR_EACH_FIELD().
X-Git-Url: https://git.tuebingen.mpg.de/?a=commitdiff_plain;h=fde2706e8ec545c46656931dd77e829b2213114c;p=paraslash.git

mp3_afh: Kill FOR_EACH_FIELD().

The macro has only one user. Open-code it to shorten the code and improve
readability.
---

diff --git a/mp3_afh.c b/mp3_afh.c
index 1fc3b62d..0f2bb760 100644
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -96,15 +96,10 @@ static char *get_string(union id3_field *field)
 	return get_utf8(string);
 }
 
-#define FOR_EACH_FIELD(f, j, fr) for (j = 0; j < (fr)->nfields && \
-	(f = id3_frame_field((fr), j)); j++)
-
 static char *get_strings(struct id3_frame *fr)
 {
-	int j;
-	union id3_field *field;
-
-	FOR_EACH_FIELD(field, j, fr) {
+	for (int j = 0; j < fr->nfields; j++) {
+		union id3_field *field = id3_frame_field(fr, j);
 		enum id3_field_type type = id3_field_type(field);
 
 		if (type == ID3_FIELD_TYPE_STRINGLIST)