diff options
| author | Peter Pentchev <roam@FreeBSD.org> | 2008-01-16 15:46:05 +0000 |
|---|---|---|
| committer | Peter Pentchev <roam@FreeBSD.org> | 2008-01-16 15:46:05 +0000 |
| commit | d9983ccbfaaedc5fba6456549dabee4f713d8403 (patch) | |
| tree | 7c93c7b77f036d92775f1d912aadf0e3bb8cedfc /security/mhash/files/patch-include-mutils-mutils.h | |
| parent | - Update HPN patch to hpn12v20 (diff) | |
Update to mhash-0.9.9, fixing several style issues, lots of memory
leaks, and two serious (even if not easily triggered) bugs.
Notes
Notes:
svn path=/head/; revision=205725
Diffstat (limited to 'security/mhash/files/patch-include-mutils-mutils.h')
| -rw-r--r-- | security/mhash/files/patch-include-mutils-mutils.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/security/mhash/files/patch-include-mutils-mutils.h b/security/mhash/files/patch-include-mutils-mutils.h new file mode 100644 index 000000000000..a5418c03fd80 --- /dev/null +++ b/security/mhash/files/patch-include-mutils-mutils.h @@ -0,0 +1,97 @@ +diff -urN -x .svn ../../branches/mhash-dist/include/mutils/mutils.h ./include/mutils/mutils.h +--- ../../branches/mhash-dist/include/mutils/mutils.h 2008-01-16 02:34:17.000000000 +0200 ++++ ./include/mutils/mutils.h 2008-01-16 02:42:32.000000000 +0200 +@@ -103,22 +103,22 @@ + #endif + + #if defined(false) +-#define MUTILS_FALSE (mutils_boolean) false ++#define MUTILS_FALSE ((mutils_boolean) false) + #else + #if defined(FALSE) +-#define MUTILS_FALSE (mutils_boolean) FALSE ++#define MUTILS_FALSE ((mutils_boolean) FALSE) + #else +-#define MUTILS_FALSE (mutils_boolean) 0 ++#define MUTILS_FALSE ((mutils_boolean) 0) + #endif /* FALSE */ + #endif /* false */ + + #if defined(true) +-#define MUTILS_TRUE (mutils_boolean) true ++#define MUTILS_TRUE ((mutils_boolean) true) + #else + #if defined(TRUE) +-#define MUTILS_TRUE (mutils_boolean) TRUE ++#define MUTILS_TRUE ((mutils_boolean) TRUE) + #else +-#define MUTILS_TRUE (mutils_boolean) -1 ++#define MUTILS_TRUE ((mutils_boolean) -1) + #endif /* TRUE */ + #endif /* true */ + +@@ -167,16 +167,16 @@ + + #define mutils_swapendian32(a) \ + ((mutils_word32) \ +- (((a & (mutils_word32) 0x000000ffU) << 24) | \ +- ((a & (mutils_word32) 0x0000ff00U) << 8) | \ +- ((a & (mutils_word32) 0x00ff0000U) >> 8) | \ +- ((a & (mutils_word32) 0xff000000U) >> 24)) \ ++ ((((a) & (mutils_word32) 0x000000ffU) << 24) | \ ++ (((a) & (mutils_word32) 0x0000ff00U) << 8) | \ ++ (((a) & (mutils_word32) 0x00ff0000U) >> 8) | \ ++ (((a) & (mutils_word32) 0xff000000U) >> 24)) \ + ) + + #define mutils_swapendian16(a) \ + ((mutils_word16) \ +- (((a & (mutils_word16) 0x00ffU) << 8) | \ +- ((a & (mutils_word16) 0xff00U) >> 8)) \ ++ ((((a) & (mutils_word16) 0x00ffU) << 8) | \ ++ (((a) & (mutils_word16) 0xff00U) >> 8)) \ + ) + + +@@ -193,30 +193,30 @@ + #define mutils_lend32(n) mutils_swapendian32(n) + #define mutils_lend16(n) mutils_swapendian16(n) + +-#define mutils_bend64(n) n +-#define mutils_bend32(n) n +-#define mutils_bend16(n) n ++#define mutils_bend64(n) (n) ++#define mutils_bend32(n) (n) ++#define mutils_bend16(n) (n) + + #define mutils_lend2sys64(n) mutils_swapendian64(n) + #define mutils_lend2sys32(n) mutils_swapendian32(n) + #define mutils_lend2sys16(n) mutils_swapendian16(n) + +-#define mutils_bend2sys32(n) n +-#define mutils_bend2sys16(n) n ++#define mutils_bend2sys32(n) (n) ++#define mutils_bend2sys16(n) (n) + + #else + +-#define mutils_lend64(n) n +-#define mutils_lend32(n) n +-#define mutils_lend16(n) n ++#define mutils_lend64(n) (n) ++#define mutils_lend32(n) (n) ++#define mutils_lend16(n) (n) + + #define mutils_bend64(n) mutils_swapendian64(n) + #define mutils_bend32(n) mutils_swapendian32(n) + #define mutils_bend16(n) mutils_swapendian16(n) + +-#define mutils_lend2sys64(n) n +-#define mutils_lend2sys32(n) n +-#define mutils_lend2sys16(n) n ++#define mutils_lend2sys64(n) (n) ++#define mutils_lend2sys32(n) (n) ++#define mutils_lend2sys16(n) (n) + + #define mutils_bend2sys64(n) mutils_swapendian64(n) + #define mutils_bend2sys32(n) mutils_swapendian32(n) |
