aboutsummaryrefslogtreecommitdiff
path: root/cmd-bind-key.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-01-21 19:38:26 +0000
committerTiago Cunha <tcunha@gmx.com>2012-01-21 19:38:26 +0000
commita3c1b730c93a648579f68c353573f4319e1219a7 (patch)
tree0df01ddb40ee315383edf072f74c35c41990246e /cmd-bind-key.c
parenta7b0b30bdd73f3a8d513fc69daf593174ee03145 (diff)
downloadrtmux-a3c1b730c93a648579f68c353573f4319e1219a7.tar.gz
rtmux-a3c1b730c93a648579f68c353573f4319e1219a7.tar.bz2
rtmux-a3c1b730c93a648579f68c353573f4319e1219a7.zip
Sync OpenBSD patchset 1008:
Use RB trees not SPLAY.
Diffstat (limited to 'cmd-bind-key.c')
-rw-r--r--cmd-bind-key.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-bind-key.c b/cmd-bind-key.c
index b7fa5eff..6182e942 100644
--- a/cmd-bind-key.c
+++ b/cmd-bind-key.c
@@ -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);
}