From 5605a046a7c135ed1aaf6d070270e03c2b36c08c Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Fri, 13 Oct 2006 09:02:04 +0000 Subject: [PATCH] handle_interlink_event: don't check whether key <= 0xFF This is a given, because any value >= 0x100 is negated. --- src/terminal/event.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/terminal/event.c b/src/terminal/event.c index 9d591016..adbd2195 100644 --- a/src/terminal/event.c +++ b/src/terminal/event.c @@ -360,14 +360,16 @@ handle_interlink_event(struct terminal *term, struct interlink_event *ilev) } } - if (key < 0x80 || key > 0xFF || !utf8_io) { + /* Note: We know that key <= 0xFF. */ + + if (key < 0x80 || !utf8_io) { /* This byte is not part of a multibyte character * encoding: either it is outside of the ranges for * UTF-8 start and continuation bytes or UTF-8 I/O mode * is disabled. */ #ifdef CONFIG_UTF8 - if (key >= 0 && key <= 0xFF && !utf8_io) { + if (key >= 0 && !utf8_io) { /* Not special and UTF-8 mode is disabled: * recode from the terminal charset to UCS-4. */ -- 2.11.4.GIT