imx-usb-loader: make the byte swap macro more robust
authorBaruch Siach <baruch@tkos.co.il>
Fri, 22 Jun 2018 11:44:05 +0000 (14:44 +0300)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 22 Jun 2018 17:09:20 +0000 (19:09 +0200)
commit7574a5b0557f03c3f3d0e059e332749314546092
tree877381b95906015c5f4842699a7d1badc6a675c8
parent8974ebaab005a40cf1564650d54d80830e730f55
imx-usb-loader: make the byte swap macro more robust

The local 16-bit byte swap implementation that was introduced in commit
b05f8f439681 (imx-usb-loader: fix build with older gcc) is not robust
enough. It suffers from double evaluation, and operators precedence
breakage. Use a better implementation suggested by Arnout Vandecappelle.

Cc: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/imx-usb-loader/0001-portable.h-fix-build-with-gcc-older-than-4.8.patch