From 9b62c58a3a6f39eb4ed24c7b7f029e6a3b0d7232 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 15 Mar 2011 23:41:17 +0000 Subject: * ext/openssl/ossl_x509ext.c: parenthesize macro arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_x509ext.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'ext/openssl/ossl_x509ext.c') diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c index 4d64602828..1bd5e07742 100644 --- a/ext/openssl/ossl_x509ext.c +++ b/ext/openssl/ossl_x509ext.c @@ -11,30 +11,30 @@ #include "ossl.h" #define WrapX509Ext(klass, obj, ext) do { \ - if (!ext) { \ + if (!(ext)) { \ ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \ } \ - obj = Data_Wrap_Struct(klass, 0, X509_EXTENSION_free, ext); \ + (obj) = Data_Wrap_Struct((klass), 0, X509_EXTENSION_free, (ext)); \ } while (0) #define GetX509Ext(obj, ext) do { \ - Data_Get_Struct(obj, X509_EXTENSION, ext); \ - if (!ext) { \ + Data_Get_Struct((obj), X509_EXTENSION, (ext)); \ + if (!(ext)) { \ ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \ } \ } while (0) #define SafeGetX509Ext(obj, ext) do { \ - OSSL_Check_Kind(obj, cX509Ext); \ - GetX509Ext(obj, ext); \ + OSSL_Check_Kind((obj), cX509Ext); \ + GetX509Ext((obj), (ext)); \ } while (0) #define MakeX509ExtFactory(klass, obj, ctx) do { \ - if (!(ctx = OPENSSL_malloc(sizeof(X509V3_CTX)))) \ + if (!((ctx) = OPENSSL_malloc(sizeof(X509V3_CTX)))) \ ossl_raise(rb_eRuntimeError, "CTX wasn't allocated!"); \ - X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, 0); \ - obj = Data_Wrap_Struct(klass, 0, ossl_x509extfactory_free, ctx); \ + X509V3_set_ctx((ctx), NULL, NULL, NULL, NULL, 0); \ + (obj) = Data_Wrap_Struct((klass), 0, ossl_x509extfactory_free, (ctx)); \ } while (0) #define GetX509ExtFactory(obj, ctx) do { \ - Data_Get_Struct(obj, X509V3_CTX, ctx); \ - if (!ctx) { \ + Data_Get_Struct((obj), X509V3_CTX, (ctx)); \ + if (!(ctx)) { \ ossl_raise(rb_eRuntimeError, "CTX wasn't initialized!"); \ } \ } while (0) -- cgit v1.2.3