summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-02-16 10:53:26 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-02-16 10:53:26 +0000
commitdd99f322c7979975e38f3960b098472e6a5a0361 (patch)
treee3384ba23eebb2f465f61a7b6b3777523c75fda0
parent84ee0062632bfb7d2b02950f892bdc20ff689745 (diff)
Style nits.
-rw-r--r--usr.bin/tmux/attributes.c16
-rw-r--r--usr.bin/tmux/cmd-run-shell.c6
-rw-r--r--usr.bin/tmux/cmd-set-option.c4
-rw-r--r--usr.bin/tmux/tmux.c4
-rw-r--r--usr.bin/tmux/window-choose.c4
5 files changed, 15 insertions, 19 deletions
diff --git a/usr.bin/tmux/attributes.c b/usr.bin/tmux/attributes.c
index d53c0ef8eaa..50580f00177 100644
--- a/usr.bin/tmux/attributes.c
+++ b/usr.bin/tmux/attributes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: attributes.c,v 1.5 2012/03/17 21:45:25 nicm Exp $ */
+/* $OpenBSD: attributes.c,v 1.6 2017/02/16 10:53:25 nicm Exp $ */
/*
* Copyright (c) 2009 Joshua Elsasser <josh@elsasser.org>
@@ -32,13 +32,13 @@ attributes_tostring(u_char attr)
return ("none");
len = xsnprintf(buf, sizeof buf, "%s%s%s%s%s%s%s",
- attr & GRID_ATTR_BRIGHT ? "bright," : "",
- attr & GRID_ATTR_DIM ? "dim," : "",
- attr & GRID_ATTR_UNDERSCORE ? "underscore," : "",
- attr & GRID_ATTR_BLINK ? "blink," : "",
- attr & GRID_ATTR_REVERSE ? "reverse," : "",
- attr & GRID_ATTR_HIDDEN ? "hidden," : "",
- attr & GRID_ATTR_ITALICS ? "italics," : "");
+ (attr & GRID_ATTR_BRIGHT) ? "bright," : "",
+ (attr & GRID_ATTR_DIM) ? "dim," : "",
+ (attr & GRID_ATTR_UNDERSCORE) ? "underscore," : "",
+ (attr & GRID_ATTR_BLINK)? "blink," : "",
+ (attr & GRID_ATTR_REVERSE) ? "reverse," : "",
+ (attr & GRID_ATTR_HIDDEN) ? "hidden," : "",
+ (attr & GRID_ATTR_ITALICS) ? "italics," : "");
if (len > 0)
buf[len - 1] = '\0';
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c
index 70d43a9b062..8e3b7cade5c 100644
--- a/usr.bin/tmux/cmd-run-shell.c
+++ b/usr.bin/tmux/cmd-run-shell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-run-shell.c,v 1.44 2017/02/03 11:57:27 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.45 2017/02/16 10:53:25 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -131,14 +131,11 @@ cmd_run_shell_callback(struct job *job)
char *cmd = cdata->cmd, *msg, *line;
size_t size;
int retcode;
- u_int lines;
- lines = 0;
do {
if ((line = evbuffer_readline(job->event->input)) != NULL) {
cmd_run_shell_print(job, line);
free(line);
- lines++;
}
} while (line != NULL);
@@ -149,7 +146,6 @@ cmd_run_shell_callback(struct job *job)
line[size] = '\0';
cmd_run_shell_print(job, line);
- lines++;
free(line);
}
diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c
index ef2ff43f97f..c544e26a6d9 100644
--- a/usr.bin/tmux/cmd-set-option.c
+++ b/usr.bin/tmux/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-option.c,v 1.111 2017/02/03 21:01:02 nicm Exp $ */
+/* $OpenBSD: cmd-set-option.c,v 1.112 2017/02/16 10:53:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -72,7 +72,7 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item)
struct cmd_find_state *fs = &item->state.tflag;
struct session *s = fs->s;
struct winlink *wl = fs->wl;
- struct window *w = wl->window;
+ struct window *w;
struct client *c;
enum options_table_scope scope;
struct options *oo;
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index ccc0a0795bb..488c7ccd3f3 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.176 2017/01/23 10:09:43 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.177 2017/02/16 10:53:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -81,7 +81,7 @@ getshell(void)
static int
checkshell(const char *shell)
{
- if (shell == NULL || *shell == '\0' || *shell != '/')
+ if (shell == NULL || *shell != '/')
return (0);
if (areshell(shell))
return (0);
diff --git a/usr.bin/tmux/window-choose.c b/usr.bin/tmux/window-choose.c
index c4e3260db50..cdd1926fd42 100644
--- a/usr.bin/tmux/window-choose.c
+++ b/usr.bin/tmux/window-choose.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-choose.c,v 1.86 2017/02/03 11:57:28 nicm Exp $ */
+/* $OpenBSD: window-choose.c,v 1.87 2017/02/16 10:53:25 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -910,7 +910,7 @@ window_choose_write_line(struct window_pane *wp, struct screen_write_ctx *ctx,
* expanded or not.
*/
(item->wcd->type & TREE_SESSION) ?
- (item->state & TREE_EXPANDED ? "-" : "+") : "", item->name);
+ ((item->state & TREE_EXPANDED) ? "-" : "+") : "", item->name);
}
while (s->cx < screen_size_x(s) - 1)
screen_write_putc(ctx, &gc, ' ');