]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp3_afh: Kill FOR_EACH_FIELD().
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 May 2025 21:44:41 +0000 (23:44 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 17 May 2025 18:05:42 +0000 (20:05 +0200)
The macro has only one user. Open-code it to shorten the code and improve
readability.

mp3_afh.c

index 1fc3b62dcd18226c3fbe2196e36648e0767afb14..0f2bb7603d39eecd74e862ae6a6288bdd5c7c574 100644 (file)
--- 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)