]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r232745:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 23 Mar 2012 10:55:19 +0000 (10:55 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 23 Mar 2012 10:55:19 +0000 (10:55 +0000)
commitd580ea90c3ec9fabab9930d7d179c94048a7ae70
treef708c21b7903f0de9721a67399a4a910da22fc40
parentf50db4b60653880d14c10840ef4505105d79e1e2
MFC r232745:

Add casts to __uint16_t to the __bswap16() macros on all arches which
didn't already have them.  This is because the ternary expression will
return int, due to the Usual Arithmetic Conversions.  Such casts are not
needed for the 32 and 64 bit variants.

While here, add additional parentheses around the x86 variant, to
protect against unintended consequences.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/amd64/include/endian.h
sys/i386/include/endian.h
sys/powerpc/include/endian.h
sys/sparc64/include/endian.h