summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-07 22:52:33 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-07 22:52:33 +0000
commit4846ad16579f7fcf06fe01e03a56815b2d8c4a93 (patch)
treee5266f60bcd3e2fbdb203a10b26c67970ddc45a8 /key-bindings.c
parent4924d8e1e2c367b9593a6972e1bcb65ab0cb0a93 (diff)
Introduce nitems() and use it; use bsearch.
Diffstat (limited to 'key-bindings.c')
-rw-r--r--key-bindings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/key-bindings.c b/key-bindings.c
index 7c0698d7..3ffd5a6b 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -1,4 +1,4 @@
-/* $Id: key-bindings.c,v 1.40 2009-01-06 14:47:56 nicm Exp $ */
+/* $Id: key-bindings.c,v 1.41 2009-01-07 22:52:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -111,7 +111,7 @@ key_bindings_init(void)
SPLAY_INIT(&key_bindings);
- for (i = 0; i < (sizeof table / sizeof table[0]); i++) {
+ for (i = 0; i < nitems(table); i++) {
cmd = xmalloc(sizeof *cmd);
cmd->entry = table[i].entry;
cmd->data = NULL;