aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-15 18:42:16 +1000
committerDavid Walter Seikel2014-04-15 18:42:16 +1000
commit5c5e40da1a0e0641bb9e4252031283c49b340132 (patch)
tree6f644e7bd9c92c343e92e798103733a2cb28690c
parentFix up a couple of bugs in the buffer full case. (diff)
downloadopensim-SC-5c5e40da1a0e0641bb9e4252031283c49b340132.zip
opensim-SC-5c5e40da1a0e0641bb9e4252031283c49b340132.tar.gz
opensim-SC-5c5e40da1a0e0641bb9e4252031283c49b340132.tar.bz2
opensim-SC-5c5e40da1a0e0641bb9e4252031283c49b340132.tar.xz
Switch to using ARRAY_LEN.
-rw-r--r--handlekeys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/handlekeys.c b/handlekeys.c
index 44c0748..8f5fad3 100644
--- a/handlekeys.c
+++ b/handlekeys.c
@@ -294,7 +294,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
294 // For a real timeout checked Esc, buffer is now empty, so this for loop 294 // For a real timeout checked Esc, buffer is now empty, so this for loop
295 // wont find it anyway. While it's true we could avoid it by checking, 295 // wont find it anyway. While it's true we could avoid it by checking,
296 // the user already had to wait for a time out, and this loop wont take THAT long. 296 // the user already had to wait for a time out, and this loop wont take THAT long.
297 for (j = 0; j < (sizeof(keys) / sizeof(*keys)); j++) 297 for (j = 0; j < ARRAY_LEN(keys); j++)
298 { 298 {
299 if (strcmp(keys[j].code, buffer) == 0) 299 if (strcmp(keys[j].code, buffer) == 0)
300 { 300 {
@@ -364,7 +364,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
364 // Unspecified params default to a value that is command dependant. 364 // Unspecified params default to a value that is command dependant.
365 // However, they will never be negative, so we can use -1 to flag 365 // However, they will never be negative, so we can use -1 to flag
366 // a default value. 366 // a default value.
367 for (j = 0; j < (sizeof(csParams) / sizeof(*csParams)); j++) 367 for (j = 0; j < ARRAY_LEN(csParams); j++)
368 csParams[j] = -1; 368 csParams[j] = -1;
369 369
370 // Check for the private bit. 370 // Check for the private bit.