diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-16 08:55:03 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-16 08:55:03 +0000 |
commit | 4928543d617e584c847b151c683ba72a0075b07d (patch) | |
tree | 119ea4a744697b66a064d5e6013a8e33083ff660 | |
parent | 7eb8872b9a8ab9ad8dc66bf1d878f71439cdffd4 (diff) | |
download | ruby-4928543d617e584c847b151c683ba72a0075b07d.tar.gz |
Merge r35953 from ruby_1_8_7.
* 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@37219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Tue Oct 16 16:51:08 2012 Akinori MUSHA <knu@iDaemons.org> + + * ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported + by Drew Yao <ayao at apple.com> + Tue Oct 16 16:30:50 2012 Akinori MUSHA <knu@iDaemons.org> * ext/openssl/ossl_x509store.c (ossl_x509store_initialize): initialize diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index b3cb59def7..d00d81473c 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -2061,11 +2061,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 */ |