libpayload: Turn the endian conversion macros into functions.
commit1cb414de638d6885ad3a8510594ea1df7d4d96a6
authorGabe Black <gabeblack@google.com>
Fri, 8 Mar 2013 12:38:13 +0000 (8 04:38 -0800)
committerRonald G. Minnich <rminnich@gmail.com>
Thu, 14 Mar 2013 03:56:05 +0000 (14 04:56 +0100)
tree33e210db74ca088607f75e7d505d26874033ee7c
parent7e568559634199668859b7c662aea7f6b41f3920
libpayload: Turn the endian conversion macros into functions.

In their current macro form, any arguments that are expressions will be
evaluated multiple times. That can cause problems if they have side effects,
and might not even compile if the overall expression is ambiguous, for
instance if you pass in foo++.

Built with code that previously wouldn't compile because the macros
expanded to ambiguous expressions.

Change-Id: I378c04d7aff5b4ad40581930ce90e49ba7df1d3e
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2719
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
payloads/libpayload/include/endian.h