From fde2706e8ec545c46656931dd77e829b2213114c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 13 May 2025 23:44:41 +0200 Subject: [PATCH] mp3_afh: Kill FOR_EACH_FIELD(). The macro has only one user. Open-code it to shorten the code and improve readability. --- mp3_afh.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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) -- 2.39.5