summaryrefslogtreecommitdiffstats
path: root/cmd-list-keys.c
diff options
context:
space:
mode:
authornicm <nicm>2015-10-26 22:03:04 +0000
committernicm <nicm>2015-10-26 22:03:04 +0000
commitb85be36d1cb96e0328b3f1dc9388288989d3b8e5 (patch)
tree4b8bf85bee0c84f261d95b6221847d7745c3b576 /cmd-list-keys.c
parenta22fe33aa00d4e29e8d71b58b8f728d83e5d23f3 (diff)
Handle unknown keys more gracefully, return a string instead of NULL.
Diffstat (limited to 'cmd-list-keys.c')
-rw-r--r--cmd-list-keys.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c
index e2d5dc52..d26486bd 100644
--- a/cmd-list-keys.c
+++ b/cmd-list-keys.c
@@ -77,8 +77,6 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq)
continue;
RB_FOREACH(bd, key_bindings, &table->key_bindings) {
key = key_string_lookup_key(bd->key);
- if (key == NULL)
- continue;
if (bd->can_repeat)
repeat = 1;
@@ -97,8 +95,6 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq)
continue;
RB_FOREACH(bd, key_bindings, &table->key_bindings) {
key = key_string_lookup_key(bd->key);
- if (key == NULL)
- continue;
if (!repeat)
r = "";
@@ -140,8 +136,6 @@ cmd_list_keys_table(struct cmd *self, struct cmd_q *cmdq)
any_mode = 0;
RB_FOREACH(mbind, mode_key_tree, mtab->tree) {
key = key_string_lookup_key(mbind->key);
- if (key == NULL)
- continue;
if (mbind->mode != 0)
any_mode = 1;
@@ -153,8 +147,6 @@ cmd_list_keys_table(struct cmd *self, struct cmd_q *cmdq)
RB_FOREACH(mbind, mode_key_tree, mtab->tree) {
key = key_string_lookup_key(mbind->key);
- if (key == NULL)
- continue;
mode = "";
if (mbind->mode != 0)