On 11/24/2011 06:40 PM, Mike Frysinger wrote: > On Thursday 24 November 2011 10:39:21 Matthias Fuchs wrote: >> - sprintf(str, "%08X%04X", >> - *(unsigned int *)&ow_id[0], >> - *(unsigned short *)&ow_id[4]); >> + sprintf(str, "%02X%02X%02X%02X%02X%02X", >> + ow_id[0], ow_id[1], ow_id[2], ow_id[3], ow_id[4], ow_id[5]); > > use __get_unaligned_le32 and __get_unaligned_le16 helpers to avoid having to > decode each byte. I must admit that I like the new style much more. But thanks for the hint on the __get-unaligned macros :-)
Matthias _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot