]> git.tue.mpg.de Git - paraslash.git/commitdiff
mp4: Remove useless casts in mp4ff_parse_tag().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Aug 2021 18:48:23 +0000 (20:48 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
These casts have no effect because "len" and the second argument of
mp4ff_read_string() are of type uint32_t.

mp4.c

diff --git a/mp4.c b/mp4.c
index 47d98bcf0403e46b1ca955efc2db45e0a4e0cf63..80acf41ac833cc147ad38ac3047aca422b5a96fc 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -977,7 +977,7 @@ static int32_t mp4ff_parse_tag(mp4ff_t * f, const uint8_t parent,
                        mp4ff_read_char(f);     /* version */
                        mp4ff_read_int24(f);    /* flags */
                        free(name);
-                       name = mp4ff_read_string(f, (uint32_t) (subsize - (header_size + 4)));
+                       name = mp4ff_read_string(f, subsize - (header_size + 4));
                        continue;
                }
                if (atom_type != ATOM_DATA)
@@ -1029,8 +1029,8 @@ static int32_t mp4ff_parse_tag(mp4ff_t * f, const uint8_t parent,
                        }
                } else {
                        free(data);
-                       data = mp4ff_read_string(f, (uint32_t) (subsize - (header_size + 8)));
-                       len = (uint32_t) (subsize - (header_size + 8));
+                       data = mp4ff_read_string(f, subsize - (header_size + 8));
+                       len = subsize - (header_size + 8);
                }
        }
        if (data) {