summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2017-02-16 10:53:25 +0000
committernicm <nicm>2017-02-16 10:53:25 +0000
commit8b8d0963da522c3a0ac4e99dc9264b6fda2b477a (patch)
tree43fa691802d7922ec30c8f79b719a20cf3aea657
parentdd25a6cdc21c76888c370a053ca2adb710a89cdf (diff)
Style nits.
-rw-r--r--attributes.c14
-rw-r--r--cmd-run-shell.c4
-rw-r--r--cmd-set-option.c2
-rw-r--r--tmux.c2
-rw-r--r--window-choose.c2
5 files changed, 10 insertions, 14 deletions
diff --git a/attributes.c b/attributes.c
index 84e4f9c6..046cdcc5 100644
--- a/attributes.c
+++ b/attributes.c
@@ -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/cmd-run-shell.c b/cmd-run-shell.c
index 29375428..e6cd7936 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -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/cmd-set-option.c b/cmd-set-option.c
index cc8b7570..a0138d86 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -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/tmux.c b/tmux.c
index d5e962df..12402bb5 100644
--- a/tmux.c
+++ b/tmux.c
@@ -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/window-choose.c b/window-choose.c
index b7647d2a..7daddc6f 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -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, ' ');