diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-01-21 11:12:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-01-21 11:12:13 +0000 |
commit | 8ed9124f3fd307a26b2b5032b02b05fe7ede023b (patch) | |
tree | 2d9e1897c93b8c529cb57aa064df061735bf2c0b /cmd-bind-key.c | |
parent | 535286c05aee55c0127cdabada8e54582905ef8e (diff) | |
download | rtmux-8ed9124f3fd307a26b2b5032b02b05fe7ede023b.tar.gz rtmux-8ed9124f3fd307a26b2b5032b02b05fe7ede023b.tar.bz2 rtmux-8ed9124f3fd307a26b2b5032b02b05fe7ede023b.zip |
Use RB trees not SPLAY.
Diffstat (limited to 'cmd-bind-key.c')
-rw-r--r-- | cmd-bind-key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-bind-key.c b/cmd-bind-key.c index 30421115..4f1b9f18 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); } |