summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-17 08:45:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-17 08:45:05 +0000
commit871472c72b4e0d6200b23329b191cf6d9636ae5f (patch)
tree82236af1be90551022f98eb99780ba12cf8d0b5f /ext/zlib/zlib.c
parent81442f903cab1cb2b7b4579a0300c37d193b27ba (diff)
Unnecessary checks
* ext/bigdecimal/bigdecimal.c: FIX2INT and FIX2UINT imply the check for Fixnum. * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 7f92eb6..4dfa2a5 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1363,7 +1363,6 @@ rb_zstream_set_avail_out(VALUE obj, VALUE size)
{
struct zstream *z = get_zstream(obj);
- Check_Type(size, T_FIXNUM);
zstream_expand_buffer_into(z, FIX2INT(size));
return size;
}
@@ -1449,7 +1448,7 @@ rb_zstream_closed_p(VALUE obj)
#define FIXNUMARG(val, ifnil) \
(NIL_P((val)) ? (ifnil) \
- : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
+ : (FIX2INT((val))))
#define ARG_LEVEL(val) FIXNUMARG((val), Z_DEFAULT_COMPRESSION)
#define ARG_WBITS(val) FIXNUMARG((val), MAX_WBITS)