On 01/24/14 16:11, Adrian Chadd wrote:
... How's that matter?
Adrian
Ok, read slowly:
uint32_t x = 255U;
uint8_t y;
On Big endian:
memcpy(&y, &x, 1);
y == 0;
On Little endian:
memcpy(&y, &x, 1);
y == 255;
If I'm not mistaken. The code is wrong because result depends on
endianness :-)
--HPS
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"