diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_bn.c | 12 |
2 files changed, 10 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Sun Feb 20 00:46:51 2011 Tanaka Akira <akr@fsij.org> + + * ext/openssl/ossl_bn.c: parenthesize macro arguments. + Sat Feb 19 22:37:42 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com> * vm_insnhelper.c (vm_check_if_namespace): guard temporary object diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c index da62f07f46..6f0181289d 100644 --- a/ext/openssl/ossl_bn.c +++ b/ext/openssl/ossl_bn.c @@ -12,22 +12,22 @@ #include "ossl.h" #define WrapBN(klass, obj, bn) do { \ - if (!bn) { \ + if (!(bn)) { \ ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \ } \ - obj = Data_Wrap_Struct(klass, 0, BN_clear_free, bn); \ + (obj) = Data_Wrap_Struct((klass), 0, BN_clear_free, (bn)); \ } while (0) #define GetBN(obj, bn) do { \ - Data_Get_Struct(obj, BIGNUM, bn); \ - if (!bn) { \ + Data_Get_Struct((obj), BIGNUM, (bn)); \ + if (!(bn)) { \ ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \ } \ } while (0) #define SafeGetBN(obj, bn) do { \ - OSSL_Check_Kind(obj, cBN); \ - GetBN(obj, bn); \ + OSSL_Check_Kind((obj), cBN); \ + GetBN((obj), (bn)); \ } while (0) /* |