summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-09-19 08:27:49 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-09-19 08:27:49 +0000
commit272e425a2f5949786d26a25e0c19f593cf04087d (patch)
tree7c7fa0fb66bb5ee45e0c4a75ca40b29c6561868d
parent961b5dd4c15a0c5a78f29a3e24284c5c1cfc9625 (diff)
downloadrockbox-272e425a2f5949786d26a25e0c19f593cf04087d.tar.gz
rockbox-272e425a2f5949786d26a25e0c19f593cf04087d.tar.bz2
rockbox-272e425a2f5949786d26a25e0c19f593cf04087d.zip
get_mp3file_info(): Use the correct printf format in DEBUGF()
Also remove useless parens and casts in bytes2int() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28115 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/mp3data.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/mp3data.c b/apps/mp3data.c
index 80159fb731..8a5f993c48 100644
--- a/apps/mp3data.c
+++ b/apps/mp3data.c
@@ -86,15 +86,13 @@ static const unsigned short freq_table[3][3] =
{11025, 12000, 8000}, /* MPEG version 2.5 */
};
-unsigned long bytes2int(unsigned long b0,
- unsigned long b1,
- unsigned long b2,
- unsigned long b3)
+unsigned long bytes2int(unsigned long b0, unsigned long b1,
+ unsigned long b2, unsigned long b3)
{
- return (((long)(b0 & 0xFF) << (3*8)) |
- ((long)(b1 & 0xFF) << (2*8)) |
- ((long)(b2 & 0xFF) << (1*8)) |
- ((long)(b3 & 0xFF) << (0*8)));
+ return (b0 & 0xFF) << (3*8) |
+ (b1 & 0xFF) << (2*8) |
+ (b2 & 0xFF) << (1*8) |
+ (b3 & 0xFF) << (0*8);
}
/* check if 'head' is a valid mp3 frame header */
@@ -531,7 +529,7 @@ int get_mp3file_info(int fd, struct mp3info *info)
DEBUGF("Frame count: %lx\n", info->frame_count);
DEBUGF("Byte count: %lx\n", info->byte_count);
DEBUGF("Offsets: %d\n", num_offsets);
- DEBUGF("Frames/entry: %d\n",
+ DEBUGF("Frames/entry: %ld\n",
bytes2int(0, 0, vbrheader[24], vbrheader[25]));
offset = 0;