summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_x509ext.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-15 23:41:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-15 23:41:17 +0000
commit9b62c58a3a6f39eb4ed24c7b7f029e6a3b0d7232 (patch)
tree49838efb53718ede537df939674626c852fc107b /ext/openssl/ossl_x509ext.c
parent3b17a84e4a428f5dcfebb70cdb92107875027236 (diff)
* 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
Diffstat (limited to 'ext/openssl/ossl_x509ext.c')
-rw-r--r--ext/openssl/ossl_x509ext.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index 4d64602..1bd5e07 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)