[patch 3/2] drivers/char/vt.c: remove unnecessary code

colbuse
2005-02-28T12:58:24Z

We could change an affectation into an incrementation by this patch, and,
so far I know, incrementing is quicker than or as quick as setting
a variable (depends on the architecture).

Please _don't_ apply this, but tell me what you think about it.
Note that npar is unsigned.

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:53:57.933256631 +0100
@@ -1655,9 +1655,9 @@
vc_state = ESnormal;
return;
case ESsquare:
- for(npar = 0 ; npar < NPAR ; npar++)
+ for(npar = NPAR-1; npar < NPAR; npar--)
par[npar] = 0;
+ npar++;
- npar = 0;
vc_state = ESgetpars;
if (c == '[') { /* Function key */
vc_state=ESfunckey;

--
Emmanuel Colbus
Club GNU/Linux
ENSIMAG - departement telecoms

-------------------------------------------------
envoyé via Webmail/IMAG !