lib/helper.c
uint8_t *array_ntoh(uint8_t *buffer, size_t length)
{
#if WORDS_BIGENDIAN
	/* Big-endian host doesn't need conversion from big-endian network */
	(void)length; /* Silence the compiler */
	return buffer;
#else
	/* Little-endian host needs conversion from big-endian network */
	return array_byteswap(buffer, length);
#endif
}
/* Convert data array from network (big-endian) to host byte order */
Convert data array from network (big-endian) to host byte order
Convert data array from network ( big - endian ) to host byte order
uint8_t *array_ntoh(uint8_t *buffer, size_t length)
{
#if WORDS_BIGENDIAN
	(void)length; 
	return buffer;
#else
	return array_byteswap(buffer, length);
#endif
}
uint8_t * array_ntoh ( uint8_t * buffer , size_t length ) { #if WORDS_BIGENDIAN ( void ) length ; return buffer ; #else return array_byteswap ( buffer , length ) ; #endif }
Convert data array from network (big-endian) to host byte order
Convert data array from network ( big - endian ) to host byte order
/* Big-endian host doesn't need conversion from big-endian network */ /* Silence the compiler */ /* Little-endian host needs conversion from big-endian network */