aboutsummaryrefslogtreecommitdiff
path: root/key-bindings.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-03-02 18:10:51 +0000
committerThomas Adam <thomas@xteddy.org>2016-03-02 18:10:51 +0000
commite304673c65d774bb76e5d55c095c8c8e6b05ff91 (patch)
treeaf461e71978b76dad59348d924a37f62b8c0bb7d /key-bindings.c
parente9d369a09e48ea8f940958025c8444988d31e840 (diff)
parentb8a102d26f41e57b94359627a4df8f22af10c6fa (diff)
downloadrtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.gz
rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.bz2
rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.zip
Merge branch 'obsd-master'
Conflicts: utf8.c
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 a922eb18..0d13385d 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -68,12 +68,12 @@ void
key_bindings_unref_table(struct key_table *table)
{
struct key_binding *bd;
+ struct key_binding *bd1;
if (--table->references != 0)
return;
- while (!RB_EMPTY(&table->key_bindings)) {
- bd = RB_ROOT(&table->key_bindings);
+ RB_FOREACH_SAFE(bd, key_bindings, &table->key_bindings, bd1) {
RB_REMOVE(key_bindings, &table->key_bindings, bd);
cmd_list_free(bd->cmdlist);
free(bd);