Mercurial > nand-ecoscentric
changeset 2436:ba162aa5247c
* include/hal_endian.h (SWAP16): Fix "return value" so
that it only returns data in lower 16 bits instead of 24.
| author | jlarmour |
|---|---|
| date | Thu, 27 Sep 2007 15:32:31 +0000 |
| parents | c67949d5702b |
| children | 66ce5ec27360 |
| files | packages/hal/common/current/ChangeLog packages/hal/common/current/include/hal_endian.h |
| diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/common/current/ChangeLog +++ b/packages/hal/common/current/ChangeLog @@ -1,3 +1,8 @@ +2007-09-27 Grant Edwards <grante@visi.com> + + * include/hal_endian.h (SWAP16): Fix "return value" so + that it only returns data in lower 16 bits instead of 24. + 2006-05-09 Andrew Lunn <andrew.lunn@ascom.ch> * src/hal_if.c (cyg_hal_diag_mangler_gdb_flush): Fix compiler
--- a/packages/hal/common/current/include/hal_endian.h +++ b/packages/hal/common/current/include/hal_endian.h @@ -63,7 +63,7 @@ #ifndef CYG_SWAP16 # define CYG_SWAP16(_x_) \ - ({ cyg_uint16 _x = (_x_); ((_x << 8) | (_x >> 8)); }) + ({ cyg_uint16 _x = (_x_); (cyg_uint16)((_x << 8) | (_x >> 8)); }) #endif #ifndef CYG_SWAP32
