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-unbind-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-unbind-key.c')
-rw-r--r-- | cmd-unbind-key.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-unbind-key.c b/cmd-unbind-key.c index 7e8c183c..22a35ed0 100644 --- a/cmd-unbind-key.c +++ b/cmd-unbind-key.c @@ -57,8 +57,8 @@ cmd_unbind_key_exec(struct cmd *self, unused struct cmd_ctx *ctx) int key; if (args_has(args, 'a')) { - while (!SPLAY_EMPTY(&key_bindings)) { - bd = SPLAY_ROOT(&key_bindings); + while (!RB_EMPTY(&key_bindings)) { + bd = RB_ROOT(&key_bindings); key_bindings_remove(bd->key); } return (0); @@ -95,8 +95,8 @@ cmd_unbind_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) { - SPLAY_REMOVE(mode_key_tree, mtab->tree, mbind); + if ((mbind = RB_FIND(mode_key_tree, mtab->tree, &mtmp)) != NULL) { + RB_REMOVE(mode_key_tree, mtab->tree, mbind); xfree(mbind); } return (0); |