[ECOS] SWAP macros
Bob Koninckx
bob.koninckx@mech.kuleuven.ac.be
Tue Nov 26 01:03:00 GMT 2002
Hi,
In hal/common/current/include/hal_endian.h
the CYG_SWAP16 macro is defined as
# define CYG_SWAP16(_x_) \
({ cyg_uint16 _x = (_x_); ((_x << 8) | (_x >> 8)); })
I don't see how this can have any effect. Shouldn't it be
# define CYG_SWAP16(_x_) \
({ cyg_uint16 _x = (_x_); _x_ = ((_x << 8) | (_x >> 8)); })
Same thing for CYG_SWAP32
Thanks
Bob
--
----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322535
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium http://www.mech.kuleuven.ac.be/pma
----------------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list