From aa93004e3d6837cc1b5ac2481827721e6b81af95 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 11 Aug 2021 19:40:03 +0200 Subject: [PATCH] mp4: Simplify atom_compare(). No need for a condition here. Change the return type to bool, and remove the pointless and misspelt comment. --- mp4.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mp4.c b/mp4.c index 959dbde8..7179958c 100644 --- 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 { -- 2.39.5