diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-23 04:40:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-23 04:40:43 +0000 |
commit | ef30e6505d9f9640a4851fe245110940fba69061 (patch) | |
tree | a6b74f282c38740a8a39639b82801160a4051a29 | |
parent | 50a5464da11c8da7ab1af0f335dfa599dc63562f (diff) | |
download | ruby-ef30e6505d9f9640a4851fe245110940fba69061.tar.gz |
tcltklib.c: elimitate dead code
* ext/tk/tcltklib.c (lib_do_one_event_core): elimitate dead code.
after Check_Type, FIX2INT which implies conversion is not
useless. nil and fixnum cannot be tainted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/tk/tcltklib.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index f3278f2a94..7b547b79d1 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -3049,11 +3049,7 @@ lib_do_one_event_core(argc, argv, self, is_ip) flags = TCL_ALL_EVENTS | TCL_DONT_WAIT; } else { Check_Type(vflags, T_FIXNUM); - flags = FIX2INT(vflags); - } - - if (rb_safe_level() >=1 && OBJ_TAINTED(vflags)) { - flags |= TCL_DONT_WAIT; + flags = (int)FIX2LONG(vflags); } if (is_ip) { |