summaryrefslogblamecommitdiff
path: root/src/misc/bswap_32.c
blob: a2418ca9ca6873bac452eff8b3d9675fcb823bba (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>>16&0xff00 | x<<16&0xff0000 | x<<24;
}