summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2011-11-24 11:48:54 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-11-25 13:50:20 +0100
commite26c1c52ba69102c662a105e2a980ef950c06b54 (patch)
tree4e70da1a72d0568b34e3952c4d255ea48ec7af49 /lib
parenta2b6da5e666a99a3f5b178b0875039ba124dc0a6 (diff)
downloadbarebox-e26c1c52ba69102c662a105e2a980ef950c06b54.tar.gz
barebox-e26c1c52ba69102c662a105e2a980ef950c06b54.tar.xz
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/readkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/readkey.c b/lib/readkey.c
index 895db8214b..1117c30ac2 100644
--- a/lib/readkey.c
+++ b/lib/readkey.c
@@ -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;
}
}