summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-03 21:08:55 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-03 21:08:55 +0000
commitf895ecdceec45c8213ec0fc1a0d8b75e11fb545d (patch)
tree58278c0285e1d001621e58116ab92c50d6ae2761 /ext
parent273af33537ae930fadf926182cff1289bed6189b (diff)
ext/win32ole/win32ole_method.c(olemethod_set_member): remove
redundant NULL check. ext/win32ole/win32ole_type.c(oletype_set_member): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/win32ole_method.c2
-rw-r--r--ext/win32ole/win32ole_type.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/win32ole/win32ole_method.c b/ext/win32ole/win32ole_method.c
index 672ec5c..051ba42 100644
--- a/ext/win32ole/win32ole_method.c
+++ b/ext/win32ole/win32ole_method.c
@@ -207,7 +207,7 @@ olemethod_set_member(VALUE self, ITypeInfo *pTypeInfo, ITypeInfo *pOwnerTypeInfo
pmethod->pTypeInfo = pTypeInfo;
OLE_ADDREF(pTypeInfo);
pmethod->pOwnerTypeInfo = pOwnerTypeInfo;
- if(pOwnerTypeInfo) OLE_ADDREF(pOwnerTypeInfo);
+ OLE_ADDREF(pOwnerTypeInfo);
pmethod->index = index;
rb_ivar_set(self, rb_intern("name"), name);
return self;
diff --git a/ext/win32ole/win32ole_type.c b/ext/win32ole/win32ole_type.c
index d2dbb3a..c5ae53c 100644
--- a/ext/win32ole/win32ole_type.c
+++ b/ext/win32ole/win32ole_type.c
@@ -188,7 +188,7 @@ oletype_set_member(VALUE self, ITypeInfo *pTypeInfo, VALUE name)
TypedData_Get_Struct(self, struct oletypedata, &oletype_datatype, ptype);
rb_ivar_set(self, rb_intern("name"), name);
ptype->pTypeInfo = pTypeInfo;
- if(pTypeInfo) OLE_ADDREF(pTypeInfo);
+ OLE_ADDREF(pTypeInfo);
return self;
}