summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-07-13 19:19:05 +0000
committerJens Arnold <amiconn@rockbox.org>2009-07-13 19:19:05 +0000
commit5f6998bde9b8a7a7aa61df602202ff41feb13ea1 (patch)
treed9b01c3781016b202a6c9b01b3432934febd111d
parentb3f33002919cd8295b0579f655054855aa7e9298 (diff)
downloadrockbox-5f6998bde9b8a7a7aa61df602202ff41feb13ea1.tar.gz
rockbox-5f6998bde9b8a7a7aa61df602202ff41feb13ea1.zip
Fix cook on big endian targets. get_uint*be() is already endian agnostic due to reading
single bytes, so the "big endian" version was plain wrong. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21846 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/librm/rm.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/apps/codecs/librm/rm.c b/apps/codecs/librm/rm.c
index a126a5cad1..bfad7e8b36 100644
--- a/apps/codecs/librm/rm.c
+++ b/apps/codecs/librm/rm.c
@@ -37,18 +37,6 @@ static uint8_t get_uint8(uint8_t *buf)
37 return (uint8_t)buf[0]; 37 return (uint8_t)buf[0];
38} 38}
39 39
40#ifdef ROCKBOX_BIG_ENDIAN
41static uint16_t get_uint16be(uint8_t *buf)
42{
43 return (uint16_t)((buf[1] << 8)|buf[0]);
44}
45
46static uint32_t get_uint32be(uint8_t *buf)
47{
48 return (uint32_t)((buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]);
49}
50
51#else
52static uint16_t get_uint16be(uint8_t *buf) 40static uint16_t get_uint16be(uint8_t *buf)
53{ 41{
54 return (uint16_t)((buf[0] << 8)|buf[1]); 42 return (uint16_t)((buf[0] << 8)|buf[1]);
@@ -58,7 +46,6 @@ static uint32_t get_uint32be(uint8_t *buf)
58{ 46{
59 return (uint32_t)((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]); 47 return (uint32_t)((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
60} 48}
61#endif /* ROCKBOX_BIG_ENDIAN */
62 49
63#ifdef TEST 50#ifdef TEST
64#include <fcntl.h> 51#include <fcntl.h>