svn commit: [26140] trunk/busybox/include

vda at busybox.net vda at busybox.net
Fri Apr 17 22:20:44 UTC 2009


Author: vda
Date: 2009-04-17 22:20:44 +0000 (Fri, 17 Apr 2009)
New Revision: 26140

Log:
fix move_to_unaligned32



Modified:
   trunk/busybox/include/platform.h


Changeset:
Modified: trunk/busybox/include/platform.h
===================================================================
--- trunk/busybox/include/platform.h	2009-04-17 21:56:02 UTC (rev 26139)
+++ trunk/busybox/include/platform.h	2009-04-17 22:20:44 UTC (rev 26140)
@@ -173,7 +173,10 @@
 /* performs reasonably well (gcc usually inlines memcpy here) */
 #define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2))
 #define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
-#define move_to_unaligned32(u32p, v)   (memcpy((u32p), &(v), 4))
+#define move_to_unaligned32(u32p, v) do { \
+	uint32_t __t = (v); \
+	memcpy((u32p), &__t, 4); \
+} while (0)
 #endif
 
 /* ---- Networking ------------------------------------------ */



More information about the busybox-cvs mailing list