[vlc-commits] Proofread byte order inline functions

Pierre Ynard git at videolan.org
Wed Aug 24 20:04:43 CEST 2011


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Aug 24 20:03:22 2011 +0200| [bbfd99f28cd4f2b4458564685659ea91f2d340d0] | committer: Pierre Ynard

Proofread byte order inline functions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bbfd99f28cd4f2b4458564685659ea91f2d340d0
---

 include/vlc_common.h |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 1da9ea9..6cf89a7 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -694,7 +694,7 @@ VLC_API char const * vlc_error( int ) VLC_USED;
 #ifdef WORDS_BIGENDIAN
 # define hton16(i) ((uint16_t)(i))
 # define hton32(i) ((uint32_t)(i))
-# define hton64(i) ((uint32_t)(i))
+# define hton64(i) ((uint64_t)(i))
 #else
 # define hton16(i) bswap16(i)
 # define hton32(i) bswap32(i)
@@ -778,28 +778,28 @@ static inline uint64_t GetQWLE (const void *p)
 }
 
 /** Writes 16 bits in network byte order */
-static inline void SetWLE (void *p, uint16_t w)
+static inline void SetWBE (void *p, uint16_t w)
 {
     w = hton16 (w);
     memcpy (p, &w, sizeof (w));
 }
 
 /** Writes 32 bits in network byte order */
-static inline void SetDWLE (void *p, uint32_t dw)
+static inline void SetDWBE (void *p, uint32_t dw)
 {
     dw = hton32 (dw);
     memcpy (p, &dw, sizeof (dw));
 }
 
 /** Writes 64 bits in network byte order */
-static inline void SetQWLE (void *p, uint64_t qw)
+static inline void SetQWBE (void *p, uint64_t qw)
 {
     qw = hton64 (qw);
     memcpy (p, &qw, sizeof (qw));
 }
 
 /** Writes 16 bits in little endian order */
-static inline void SetWBE (void *p, uint16_t w)
+static inline void SetWLE (void *p, uint16_t w)
 {
 #ifdef WORDS_BIGENDIAN
     w = bswap16 (w);
@@ -808,7 +808,7 @@ static inline void SetWBE (void *p, uint16_t w)
 }
 
 /** Writes 32 bits in little endian order */
-static inline void SetDWBE (void *p, uint32_t dw)
+static inline void SetDWLE (void *p, uint32_t dw)
 {
 #ifdef WORDS_BIGENDIAN
     dw = bswap32 (dw);
@@ -817,10 +817,10 @@ static inline void SetDWBE (void *p, uint32_t dw)
 }
 
 /** Writes 64 bits in little endian order */
-static inline void SetQWBE (void *p, uint64_t qw)
+static inline void SetQWLE (void *p, uint64_t qw)
 {
 #ifdef WORDS_BIGENDIAN
-    qw = bswap32 (qw);
+    qw = bswap64 (qw);
 #endif
     memcpy (p, &qw, sizeof (qw));
 }



More information about the vlc-commits mailing list