summaryrefslogblamecommitdiff
path: root/src/misc/bswap_32.c
blob: f26d411fe145dcc57c266bcd6b2f50b4e060efeb (plain) (tree)
1
2
3
4
5
6
7




                             
                                                           
 
#include <endian.h>
#include <stdint.h>

uint32_t bswap_32(uint32_t x)
{
	return x>>24 | x>>8&0xff00 | x<<8&0xff0000 | x<<24;
}