]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Trivial cleanups of mp4ff_parse_tag().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Aug 2021 18:36:32 +0000 (20:36 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
The sprintf statement fits in a single line and the curly braces
are redundant.

mp4.c

diff --git a/mp4.c b/mp4.c
index 44b185c1fb52252d8b830e6a68f7e64cc5d8bdb2..fc74327138d8f9a3b4beb2adde0d1232fa9e3958 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -993,15 +993,12 @@ static int32_t mp4ff_parse_tag(mp4ff_t * f, const uint8_t parent_atom_type,
 
                                if (parent_atom_type == ATOM_TEMPO) {
                                        char temp[16];
-                                       sprintf(temp,
-                                               "%.5u BPM",
-                                               val);
+                                       sprintf(temp, "%.5u BPM", val);
                                        mp4ff_tag_add_field(&(f-> tags), "tempo", temp, -1);
                                } else {
                                        const char *temp = mp4ff_meta_index_to_genre(val);
-                                       if (temp) {
+                                       if (temp)
                                                mp4ff_tag_add_field (&(f->tags), "genre", temp, -1);
-                                       }
                                }
                                done = 1;
                        }