aboutsummaryrefslogtreecommitdiff
path: root/key-bindings.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2016-02-19 16:45:35 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2016-02-19 16:45:35 +0000
commita011b67f56448b38e251418f0af67ff12411a0a0 (patch)
tree8a45444b9370d48efa7d1e6d4d91049a69e45b03 /key-bindings.c
parentc3f93e71785290d717ecf60623b99b30d4941850 (diff)
downloadrtmux-a011b67f56448b38e251418f0af67ff12411a0a0.tar.gz
rtmux-a011b67f56448b38e251418f0af67ff12411a0a0.tar.bz2
rtmux-a011b67f56448b38e251418f0af67ff12411a0a0.zip
Remove unused variables.
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);