Update preset.
[bertos.git] / bertos / cpu / byteorder.h
index 721f81e51435b9c1554728e1be917ebf98bf85de..37d7a84167d97b24d3da9e150f878f461f207b97 100644 (file)
@@ -132,7 +132,7 @@ INLINE float swab_float(float x)
        /* 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