mirror of
https://github.com/wiire-a/pixiewps.git
synced 2025-07-27 15:54:29 +02:00
Updated endianness.h
This commit is contained in:
parent
0c9f51e171
commit
e3917d2c83
@ -132,17 +132,17 @@
|
||||
|
||||
static __inline uint16_t end_bswap16(uint16_t __x)
|
||||
{
|
||||
return __x<<8 | __x>>8;
|
||||
return (__x<<8) | (__x>>8);
|
||||
}
|
||||
|
||||
static __inline uint32_t end_bswap32(uint32_t __x)
|
||||
{
|
||||
return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
|
||||
return (__x>>24) | (__x>>8&0xff00) | (__x<<8&0xff0000) | (__x<<24);
|
||||
}
|
||||
|
||||
static __inline uint64_t end_bswap64(uint64_t __x)
|
||||
{
|
||||
return end_bswap32(__x)+0ULL<<32 | end_bswap32(__x>>32);
|
||||
return ((end_bswap32(__x)+0ULL)<<32) | (end_bswap32(__x>>32));
|
||||
}
|
||||
|
||||
static __inline uint16_t end_net2host16(uint16_t net_number)
|
||||
|
Loading…
x
Reference in New Issue
Block a user