9
0
Fork 0

readkey: Use ARRAY_SIZE

Update to commit:

6df16cb readkey: force return from while true

Use ARRAY_SIZE instead of hardcoded value

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jan Weitzel 2011-11-24 11:48:54 +01:00 committed by Sascha Hauer
parent a2b6da5e66
commit e26c1c52ba
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ int read_key(void)
esc[i] = getc();
if (esc[i++] == '~')
break;
if (i == 5)
if (i == ARRAY_SIZE(esc))
return -1;
}
}