diff --git a/ChangeLog b/ChangeLog index 0ce786a569..72f0592f2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Mar 13 18:11:28 2011 Tanaka Akira + + * ext/openssl/ossl_x509attr.c: parenthesize macro arguments. + Sun Mar 13 16:07:58 2011 Shota Fukumori * lib/pstore.rb: Fix don't raise "nested transaction" when thread_safe diff --git a/ext/openssl/ossl_x509attr.c b/ext/openssl/ossl_x509attr.c index 1ab13692d4..1f36ca8b12 100644 --- a/ext/openssl/ossl_x509attr.c +++ b/ext/openssl/ossl_x509attr.c @@ -11,20 +11,20 @@ #include "ossl.h" #define WrapX509Attr(klass, obj, attr) do { \ - if (!attr) { \ + if (!(attr)) { \ ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \ } \ - obj = Data_Wrap_Struct(klass, 0, X509_ATTRIBUTE_free, attr); \ + (obj) = Data_Wrap_Struct((klass), 0, X509_ATTRIBUTE_free, (attr)); \ } while (0) #define GetX509Attr(obj, attr) do { \ - Data_Get_Struct(obj, X509_ATTRIBUTE, attr); \ - if (!attr) { \ + Data_Get_Struct((obj), X509_ATTRIBUTE, (attr)); \ + if (!(attr)) { \ ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \ } \ } while (0) #define SafeGetX509Attr(obj, attr) do { \ - OSSL_Check_Kind(obj, cX509Attr); \ - GetX509Attr(obj, attr); \ + OSSL_Check_Kind((obj), cX509Attr); \ + GetX509Attr((obj), (attr)); \ } while (0) /*