summaryrefslogtreecommitdiffstats
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-04-30 21:02:26 +0100
committerThomas Adam <thomas@xteddy.org>2019-04-30 21:02:26 +0100
commitdc7e53897adfa5ebdd8157f8b866531e7263711b (patch)
treeddadd18d49f7199cad951de79285deb7d2964f7f /cmd-show-options.c
parent1156d91cf848cbeb9792b729f16cd359d15fbe6d (diff)
parent429c4bc51b2c03e400802c9d224e4f7cc6113194 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r--cmd-show-options.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c
index 4948ff79..e3cfbc54 100644
--- a/cmd-show-options.c
+++ b/cmd-show-options.c
@@ -215,19 +215,21 @@ static enum cmd_retval
cmd_show_options_all(struct cmd *self, struct cmdq_item *item,
struct options *oo)
{
- struct options_entry *o;
- struct options_array_item *a;
- u_int idx;
- int flags;
+ struct options_entry *o;
+ struct options_array_item *a;
+ u_int idx;
+ const struct options_table_entry *oe;
o = options_first(oo);
while (o != NULL) {
- flags = options_table_entry(o)->flags;
+ oe = options_table_entry(o);
if ((self->entry != &cmd_show_hooks_entry &&
!args_has(self->args, 'H') &&
- (flags & OPTIONS_TABLE_IS_HOOK)) ||
+ oe != NULL &&
+ (oe->flags & OPTIONS_TABLE_IS_HOOK)) ||
(self->entry == &cmd_show_hooks_entry &&
- (~flags & OPTIONS_TABLE_IS_HOOK))) {
+ (oe == NULL ||
+ (~oe->flags & OPTIONS_TABLE_IS_HOOK)))) {
o = options_next(o);
continue;
}