summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-07 10:05:59 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-07 10:05:59 +0000
commit15fbb87b594a47ed622829cfdd6891eb97ea4726 (patch)
tree3466fe9a8eed84ef481ab3fd5407df92dc356b9b /ext
parentd18b653719687756c82c7c800dee5e91b388fefd (diff)
merge revision(s) 30993:
* ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported by Drew Yao <ayao at apple.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@35953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 16be5207ba..7ebb3f76fc 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2032,11 +2032,11 @@ static int gnAlloc=0; /* Memory allocation counter */
VP_EXPORT void *
VpMemAlloc(U_LONG mb)
{
- void *p = xmalloc((unsigned int)mb);
- if(!p) {
- VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
+ void *p = xmalloc(mb);
+ if (!p) {
+ VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
}
- memset(p,0,mb);
+ memset(p, 0, mb);
#ifdef _DEBUG
gnAlloc++; /* Count allocation call */
#endif /* _DEBUG */