Messages in this thread Patch in this message | | | Date | Mon, 28 Feb 2005 13:55:28 +0100 | From | colbuse@ensisun ... | Subject | [patch 2/2] drivers/chat/vt.c: remove unnecessary code |
| |
Avoid changing the state of the console two times in some cases.
Signed-off-by: Emmanuel Colbus <emmanuel.colbus@ensimag.imag.fr>
--- old/drivers/char/vt.c 2004-12-24 22:35:25.000000000 +0100 +++ new/drivers/char/vt.c 2005-02-28 12:56:46.154311486 +0100 @@ -1571,7 +1571,6 @@ } switch(vc_state) { case ESesc: - vc_state = ESnormal; switch (c) { case '[': vc_state = ESsquare; @@ -1585,25 +1584,25 @@ case 'E': cr(currcons); lf(currcons); - return; + break; case 'M': ri(currcons); - return; + break; case 'D': lf(currcons); - return; + break; case 'H': tab_stop[x >> 5] |= (1 << (x & 31)); - return; + break; case 'Z': respond_ID(tty); - return; + break; case '7': save_cur(currcons); - return; + break; case '8': restore_cur(currcons); - return; + break; case '(': vc_state = ESsetG0; return; @@ -1615,14 +1614,15 @@ return; case 'c': reset_terminal(currcons,1); - return; + break; case '>': /* Numeric keypad */ clr_kbd(kbdapplic); - return; + break; case '=': /* Appl. keypad */ set_kbd(kbdapplic); - return; + /* Here, we don't need any break; */ } + vc_state = ESnormal; return; case ESnonstd: if (c=='P') { /* palette escape sequence */
-- Emmanuel Colbus Club GNU/Linux ENSIMAG - departement telecoms
------------------------------------------------- envoyé via Webmail/IMAG ! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |