tty:remove redundant code