add missing brackets to some endian macros

git-svn: trunk@2001
remotes/push_mirror/metadata
Tomasz Kojm 19 years ago
parent 7f859d6cd0
commit 38cb3f8f52
  1. 5
      clamav-devel/ChangeLog
  2. 4
      clamav-devel/libclamav/others.h

@ -1,3 +1,8 @@
Tue May 30 15:45:24 CEST 2006 (tk)
----------------------------------
* libclamav/others.h: add missing brackets to some endian macros, spotted
by Trog
Tue May 30 14:49:39 CEST 2006 (tk) Tue May 30 14:49:39 CEST 2006 (tk)
---------------------------------- ----------------------------------
* libclamav/unzip.c: improve __zip_find_disk_trailer, try to detect proper * libclamav/unzip.c: improve __zip_find_disk_trailer, try to detect proper

@ -70,7 +70,7 @@ typedef struct {
#define le16_to_host(v) (v) #define le16_to_host(v) (v)
#define le32_to_host(v) (v) #define le32_to_host(v) (v)
#define le64_to_host(v) (v) #define le64_to_host(v) (v)
#define be16_to_host(v) ((v >> 8) | (v & 0xFF << 8)) #define be16_to_host(v) ((v >> 8) | ((v & 0xFF) << 8))
#define be32_to_host(v) ((v >> 24) | ((v & 0x00FF0000) >> 8) | \ #define be32_to_host(v) ((v >> 24) | ((v & 0x00FF0000) >> 8) | \
((v & 0x0000FF00) << 8) | (v << 24)) ((v & 0x0000FF00) << 8) | (v << 24))
#define be64_to_host(v) ((v >> 56) | ((v & 0x00FF000000000000LL) >> 40) | \ #define be64_to_host(v) ((v >> 56) | ((v & 0x00FF000000000000LL) >> 40) | \
@ -81,7 +81,7 @@ typedef struct {
((v & 0x000000000000FF00LL) << 40) | \ ((v & 0x000000000000FF00LL) << 40) | \
(v << 56)) (v << 56))
#else #else
#define le16_to_host(v) ((v >> 8) | (v & 0xFF << 8)) #define le16_to_host(v) ((v >> 8) | ((v & 0xFF) << 8))
#define le32_to_host(v) ((v >> 24) | ((v & 0x00FF0000) >> 8) | \ #define le32_to_host(v) ((v >> 24) | ((v & 0x00FF0000) >> 8) | \
((v & 0x0000FF00) << 8) | (v << 24)) ((v & 0x0000FF00) << 8) | (v << 24))
#define le64_to_host(v) ((v >> 56) | ((v & 0x00FF000000000000LL) >> 40) | \ #define le64_to_host(v) ((v >> 56) | ((v & 0x00FF000000000000LL) >> 40) | \

Loading…
Cancel
Save