summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-09 13:56:47 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-09 13:56:47 +0000
commiteb75ba1f83abeaad2fb3924fba558c2a3846e42f (patch)
treea7e0c830de64bb412d74d37faff77a67e9347bac /usr.bin
parent1fdad6347e22272bb8a487c69b3f5a1b742ddcfe (diff)
A couple of other redundant checks/assignments.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-list-keys.c6
-rw-r--r--usr.bin/tmux/cmd-show-options.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c
index 1b083c91dcb..54552023289 100644
--- a/usr.bin/tmux/cmd-list-keys.c
+++ b/usr.bin/tmux/cmd-list-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-keys.c,v 1.52 2020/04/05 08:40:31 nicm Exp $ */
+/* $OpenBSD: cmd-list-keys.c,v 1.53 2020/04/09 13:56:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -269,7 +269,7 @@ cmd_list_keys_exec(struct cmd *self, struct cmdq_item *item)
tmpsize *= 2;
tmp = xrealloc(tmp, tmpsize);
}
- tmpused = strlcat(tmp, cp, tmpsize);
+ strlcat(tmp, cp, tmpsize);
tmpused = strlcat(tmp, " ", tmpsize);
free(cp);
@@ -279,7 +279,7 @@ cmd_list_keys_exec(struct cmd *self, struct cmdq_item *item)
tmpsize *= 2;
tmp = xrealloc(tmp, tmpsize);
}
- tmpused = strlcat(tmp, cp, tmpsize);
+ strlcat(tmp, cp, tmpsize);
tmpused = strlcat(tmp, " ", tmpsize);
free(cp);
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index c16aa8aa1c0..11fe12d7f62 100644
--- a/usr.bin/tmux/cmd-show-options.c
+++ b/usr.bin/tmux/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-options.c,v 1.57 2019/06/20 13:39:17 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.58 2020/04/09 13:56:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -212,11 +212,9 @@ cmd_show_options_all(struct cmd *self, struct cmdq_item *item, int scope,
if ((self->entry != &cmd_show_hooks_entry &&
!args_has(self->args, 'H') &&
- oe != NULL &&
(oe->flags & OPTIONS_TABLE_IS_HOOK)) ||
(self->entry == &cmd_show_hooks_entry &&
- (oe == NULL ||
- (~oe->flags & OPTIONS_TABLE_IS_HOOK))))
+ (~oe->flags & OPTIONS_TABLE_IS_HOOK)))
continue;
o = options_get_only(oo, oe->name);