summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/openssl/ossl_hmac.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 38a06d4..b6c6535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Feb 24 23:02:55 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/openssl/ossl_hmac.c: parenthesize macro arguments.
+
Thu Feb 24 22:53:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (love): for the birthday.
diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c
index d87fc3e..6357502 100644
--- a/ext/openssl/ossl_hmac.c
+++ b/ext/openssl/ossl_hmac.c
@@ -13,16 +13,16 @@
#include "ossl.h"
#define MakeHMAC(obj, klass, ctx) \
- obj = Data_Make_Struct(klass, HMAC_CTX, 0, ossl_hmac_free, ctx)
+ (obj) = Data_Make_Struct((klass), HMAC_CTX, 0, ossl_hmac_free, (ctx))
#define GetHMAC(obj, ctx) do { \
- Data_Get_Struct(obj, HMAC_CTX, ctx); \
- if (!ctx) { \
+ Data_Get_Struct((obj), HMAC_CTX, (ctx)); \
+ if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
} \
} while (0)
#define SafeGetHMAC(obj, ctx) do { \
- OSSL_Check_Kind(obj, cHMAC); \
- GetHMAC(obj, ctx); \
+ OSSL_Check_Kind((obj), cHMAC); \
+ GetHMAC((obj), (ctx)); \
} while (0)
/*