summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-bind-key.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-01-21 11:12:13 +0000
committernicm <nicm@openbsd.org>2012-01-21 11:12:13 +0000
commit574ef2a1d1ea328fc0d709b820108f9f1ae58aed (patch)
tree23a3dbcd3eb77ea2c1c57c0d7644e151fd9cea1f /usr.bin/tmux/cmd-bind-key.c
parentDrop the ability to have a list of keys in the prefix in favour of two (diff)
downloadwireguard-openbsd-574ef2a1d1ea328fc0d709b820108f9f1ae58aed.tar.xz
wireguard-openbsd-574ef2a1d1ea328fc0d709b820108f9f1ae58aed.zip
Use RB trees not SPLAY.
Diffstat (limited to 'usr.bin/tmux/cmd-bind-key.c')
-rw-r--r--usr.bin/tmux/cmd-bind-key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-bind-key.c b/usr.bin/tmux/cmd-bind-key.c
index d34cc988fd8..a01a95025b2 100644
--- a/usr.bin/tmux/cmd-bind-key.c
+++ b/usr.bin/tmux/cmd-bind-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-bind-key.c,v 1.11 2011/01/15 20:14:41 nicm Exp $ */
+/* $OpenBSD: cmd-bind-key.c,v 1.12 2012/01/21 11:12:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -107,7 +107,7 @@ cmd_bind_key_table(struct cmd *self, struct cmd_ctx *ctx, int key)
mtmp.key = key;
mtmp.mode = !!args_has(args, 'c');
- if ((mbind = SPLAY_FIND(mode_key_tree, mtab->tree, &mtmp)) != NULL) {
+ if ((mbind = RB_FIND(mode_key_tree, mtab->tree, &mtmp)) != NULL) {
mbind->cmd = cmd;
return (0);
}
@@ -115,6 +115,6 @@ cmd_bind_key_table(struct cmd *self, struct cmd_ctx *ctx, int key)
mbind->key = mtmp.key;
mbind->mode = mtmp.mode;
mbind->cmd = cmd;
- SPLAY_INSERT(mode_key_tree, mtab->tree, mbind);
+ RB_INSERT(mode_key_tree, mtab->tree, mbind);
return (0);
}