On Fri, Jun 15, 2012 at 07:52:50PM +0200, Hilko Bengen wrote:
+#define htole16(_x) ( (((_x) & 0xff) << 8) | \
(((_x) & 0xff00) >> 8) )
+#define htole32(_x) ( (((_x) & 0xff) << 24) | \
(((_x) & 0xff00) << 8) | \
(((_x) & 0xff0000) >> 8) | \
(((_x) & 0xff000000) >> 24) )
You shouldn't really define macros that expand their arguments multiple times.
David