projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Manage the page writing on two banks. Move flash info in sam3 defines.
[bertos.git]
/
bertos
/
cpu
/
byteorder.h
diff --git
a/bertos/cpu/byteorder.h
b/bertos/cpu/byteorder.h
index 721f81e51435b9c1554728e1be917ebf98bf85de..37d7a84167d97b24d3da9e150f878f461f207b97 100644
(file)
--- a/
bertos/cpu/byteorder.h
+++ b/
bertos/cpu/byteorder.h
@@
-132,7
+132,7
@@
INLINE float swab_float(float x)
/* Avoid breaking strict aliasing rules. */
char *cx = (char *)(&x);
STATIC_ASSERT(sizeof(float) == 4);
/* Avoid breaking strict aliasing rules. */
char *cx = (char *)(&x);
STATIC_ASSERT(sizeof(float) == 4);
- #define BYTEORDER_SWAP(a, b)
((a) ^= (b) ^= (a) ^= (b)
)
+ #define BYTEORDER_SWAP(a, b)
do { (a) ^= (b); (b) ^= (a); (a) ^= (b); } while(0
)
BYTEORDER_SWAP(cx[0], cx[3]);
BYTEORDER_SWAP(cx[1], cx[2]);
#undef BYTEORDER_SWAP
BYTEORDER_SWAP(cx[0], cx[3]);
BYTEORDER_SWAP(cx[1], cx[2]);
#undef BYTEORDER_SWAP