summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-23 04:40:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-23 04:40:43 +0000
commit3d18ceab9a7054266fec1292a1b35ec96c6997bc (patch)
treea6b74f282c38740a8a39639b82801160a4051a29 /ext
parentc285a4e3578c30b074f665e5f63283800fe3e157 (diff)
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
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/tcltklib.c6
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) {