Style nits.

pull/785/head
nicm 2017-02-16 10:53:25 +00:00
parent dd25a6cdc2
commit 8b8d0963da
5 changed files with 10 additions and 14 deletions

View File

@ -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';

View File

@ -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);
}

View File

@ -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;

2
tmux.c
View File

@ -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);

View File

@ -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, ' ');