[vlc-devel] commit: Use netinet macros instead of pointer access ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu May 22 22:45:03 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu May 22 23:46:34 2008 +0300| [fa781f2253cc4438cddfc4420b23496a42df66bd]
Use netinet macros instead of pointer access
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa781f2253cc4438cddfc4420b23496a42df66bd
---
include/vlc_common.h | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/include/vlc_common.h b/include/vlc_common.h
index e135ea7..f153040 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -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
More information about the vlc-devel
mailing list