Commit fa781f22 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use netinet macros instead of pointer access

parent 41a9fefc
......@@ -695,19 +695,16 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
SetDWBE( p, ( i_qw >> 32)&0xffffffff );
}
#define hton16(i) htons(i)
#define hton32(i) htonl(i)
#define ntoh16(i) ntohs(i)
#define ntoh32(i) ntohl(i)
#ifdef WORDS_BIGENDIAN
# define hton16(i) ( i )
# define hton32(i) ( i )
# define hton64(i) ( i )
# define ntoh16(i) ( i )
# define ntoh32(i) ( i )
# define ntoh64(i) ( i )
#else
# define hton16(i) U16_AT(&i)
# define hton32(i) U32_AT(&i)
# define hton64(i) U64_AT(&i)
# define ntoh16(i) U16_AT(&i)
# define ntoh32(i) U32_AT(&i)
# define ntoh64(i) U64_AT(&i)
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment