From 19417db99ac8475fc111a5b9a7b4caa186cb476e Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 14 Feb 2007 07:46:11 +0000 Subject: Use the correct swap functions for live conversion, and fix 64 bit sims. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12302 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/structec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/firmware/common/structec.c b/firmware/common/structec.c index ec7e1409fd..7c76874692 100644 --- a/firmware/common/structec.c +++ b/firmware/common/structec.c @@ -18,6 +18,7 @@ ****************************************************************************/ #include +#include #include "structec.h" #include "system.h" #include "file.h" @@ -66,17 +67,17 @@ void structec_convert(void *structure, const char *ecinst, /* Swap 2 bytes. */ case 's': { - unsigned short *data = (unsigned short *)buf; - *data = SWAP_16(*data); + uint16_t *data = (uint16_t *)buf; + *data = swap16(*data); buf += 2; break; } - + /* Swap 4 bytes. */ case 'l': { - unsigned long *data = (unsigned long *)buf; - *data = SWAP_32(*data); + uint32_t *data = (uint32_t *)buf; + *data = swap32(*data); buf += 4; break; } -- cgit v1.2.3