Simplify bswap_16 implementation
Simplify bswap_16 implementation on platforms which don't already have it defined. This has no effect on the generated assembly; it just simplifies the source code.
This commit is contained in:
parent
3f726c99f8
commit
e40fa987e4
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@
|
|||
#if HAVE_DECL_BSWAP_16 == 0
|
||||
inline uint16_t bswap_16(uint16_t x)
|
||||
{
|
||||
return (x >> 8) | ((x & 0x00ff) << 8);
|
||||
return (x >> 8) | (x << 8);
|
||||
}
|
||||
#endif // HAVE_DECL_BSWAP16
|
||||
|
||||
|
|
Loading…
Reference in a new issue