From 272e425a2f5949786d26a25e0c19f593cf04087d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sun, 19 Sep 2010 08:27:49 +0000 Subject: [PATCH] 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 --- apps/mp3data.c | 16 +++++++--------- 1 file 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;