]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Simplify atom_compare().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 11 Aug 2021 17:40:03 +0000 (19:40 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
No need for a condition here. Change the return type to bool, and
remove the pointless and misspelt comment.

mp4.c

diff --git a/mp4.c b/mp4.c
index 959dbde8c677676eff5464476b66a35e87f22ff3..7179958cef75caa4436e154bf7db3816d4ec42e0 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -107,14 +107,10 @@ static uint64_t read_int64(struct mp4 *f)
        return read_u64_be(data);
 }
 
-/* comnapre 2 atom names, returns 1 for equal, 0 for unequal */
-static int32_t atom_compare(int8_t a1, int8_t b1, int8_t c1, int8_t d1,
+static bool atom_compare(int8_t a1, int8_t b1, int8_t c1, int8_t d1,
                int8_t a2, int8_t b2, int8_t c2, int8_t d2)
 {
-       if (a1 == a2 && b1 == b2 && c1 == c2 && d1 == d2)
-               return 1;
-       else
-               return 0;
+       return a1 == a2 && b1 == b2 && c1 == c2 && d1 == d2;
 }
 
 enum atoms {