mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 19:08:58 +00:00
Some style nits.
This commit is contained in:
parent
0c84a20d2f
commit
3a6d82b7c8
@ -112,7 +112,7 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
}
|
}
|
||||||
next_prompt = prompts;
|
next_prompt = prompts;
|
||||||
} else
|
} else
|
||||||
next_prompt = prompts = xstrdup (s);
|
next_prompt = prompts = xstrdup(s);
|
||||||
if ((s = args_get(args, 'I')) != NULL)
|
if ((s = args_get(args, 'I')) != NULL)
|
||||||
next_input = inputs = xstrdup(s);
|
next_input = inputs = xstrdup(s);
|
||||||
else
|
else
|
||||||
|
@ -126,7 +126,7 @@ cmdq_new(void)
|
|||||||
{
|
{
|
||||||
struct cmdq_list *queue;
|
struct cmdq_list *queue;
|
||||||
|
|
||||||
queue = xcalloc (1, sizeof *queue);
|
queue = xcalloc(1, sizeof *queue);
|
||||||
TAILQ_INIT (&queue->list);
|
TAILQ_INIT (&queue->list);
|
||||||
return (queue);
|
return (queue);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ cmd_refresh_client_clipboard(struct cmd *self, struct cmdq_item *item)
|
|||||||
}
|
}
|
||||||
if (i != tc->clipboard_npanes)
|
if (i != tc->clipboard_npanes)
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
tc->clipboard_panes = xreallocarray (tc->clipboard_panes,
|
tc->clipboard_panes = xreallocarray(tc->clipboard_panes,
|
||||||
tc->clipboard_npanes + 1, sizeof *tc->clipboard_panes);
|
tc->clipboard_npanes + 1, sizeof *tc->clipboard_panes);
|
||||||
tc->clipboard_panes[tc->clipboard_npanes++] = fs.wp->id;
|
tc->clipboard_panes[tc->clipboard_npanes++] = fs.wp->id;
|
||||||
}
|
}
|
||||||
|
2
format.c
2
format.c
@ -2597,7 +2597,7 @@ format_cb_user(__unused struct format_tree *ft)
|
|||||||
|
|
||||||
if ((pw = getpwuid(getuid())) != NULL)
|
if ((pw = getpwuid(getuid())) != NULL)
|
||||||
return (xstrdup(pw->pw_name));
|
return (xstrdup(pw->pw_name));
|
||||||
return NULL;
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Format table type. */
|
/* Format table type. */
|
||||||
|
2
log.c
2
log.c
@ -143,7 +143,7 @@ fatal(const char *msg, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
if (snprintf(tmp, sizeof tmp, "fatal: %s: ", strerror(errno)) < 0)
|
if (snprintf(tmp, sizeof tmp, "fatal: %s: ", strerror(errno)) < 0)
|
||||||
exit (1);
|
exit(1);
|
||||||
|
|
||||||
va_start(ap, msg);
|
va_start(ap, msg);
|
||||||
log_vwrite(msg, ap, tmp);
|
log_vwrite(msg, ap, tmp);
|
||||||
|
2
notify.c
2
notify.c
@ -46,7 +46,7 @@ notify_insert_one_hook(struct cmdq_item *item, struct notify_entry *ne,
|
|||||||
if (log_get_level() != 0) {
|
if (log_get_level() != 0) {
|
||||||
s = cmd_list_print(cmdlist, 0);
|
s = cmd_list_print(cmdlist, 0);
|
||||||
log_debug("%s: hook %s is: %s", __func__, ne->name, s);
|
log_debug("%s: hook %s is: %s", __func__, ne->name, s);
|
||||||
free (s);
|
free(s);
|
||||||
}
|
}
|
||||||
new_item = cmdq_get_command(cmdlist, state);
|
new_item = cmdq_get_command(cmdlist, state);
|
||||||
return (cmdq_insert_after(item, new_item));
|
return (cmdq_insert_after(item, new_item));
|
||||||
|
2
proc.c
2
proc.c
@ -202,7 +202,7 @@ proc_start(const char *name)
|
|||||||
#endif
|
#endif
|
||||||
, event_get_version(), event_get_method()
|
, event_get_version(), event_get_method()
|
||||||
#ifdef HAVE_UTF8PROC
|
#ifdef HAVE_UTF8PROC
|
||||||
, utf8proc_version ()
|
, utf8proc_version()
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
4
screen.c
4
screen.c
@ -661,9 +661,9 @@ screen_mode_to_string(int mode)
|
|||||||
static char tmp[1024];
|
static char tmp[1024];
|
||||||
|
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
return "NONE";
|
return ("NONE");
|
||||||
if (mode == ALL_MODES)
|
if (mode == ALL_MODES)
|
||||||
return "ALL";
|
return ("ALL");
|
||||||
|
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
if (mode & MODE_CURSOR)
|
if (mode & MODE_CURSOR)
|
||||||
|
@ -42,8 +42,8 @@ static int
|
|||||||
server_acl_cmp(struct server_acl_user *user1, struct server_acl_user *user2)
|
server_acl_cmp(struct server_acl_user *user1, struct server_acl_user *user2)
|
||||||
{
|
{
|
||||||
if (user1->uid < user2->uid)
|
if (user1->uid < user2->uid)
|
||||||
return -1;
|
return (-1);
|
||||||
return user1->uid > user2->uid;
|
return (user1->uid > user2->uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
RB_HEAD(server_acl_entries, server_acl_user) server_acl_entries;
|
RB_HEAD(server_acl_entries, server_acl_user) server_acl_entries;
|
||||||
@ -66,7 +66,7 @@ server_acl_user_find(uid_t uid)
|
|||||||
{
|
{
|
||||||
struct server_acl_user find = { .uid = uid };
|
struct server_acl_user find = { .uid = uid };
|
||||||
|
|
||||||
return RB_FIND(server_acl_entries, &server_acl_entries, &find);
|
return (RB_FIND(server_acl_entries, &server_acl_entries, &find));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display the tree. */
|
/* Display the tree. */
|
||||||
|
@ -3158,7 +3158,7 @@ server_client_add_client_window(struct client *c, u_int id)
|
|||||||
cw->window = id;
|
cw->window = id;
|
||||||
RB_INSERT(client_windows, &c->windows, cw);
|
RB_INSERT(client_windows, &c->windows, cw);
|
||||||
}
|
}
|
||||||
return cw;
|
return (cw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get client active pane. */
|
/* Get client active pane. */
|
||||||
|
2
tmux.c
2
tmux.c
@ -325,7 +325,7 @@ find_home(void)
|
|||||||
const char *
|
const char *
|
||||||
getversion(void)
|
getversion(void)
|
||||||
{
|
{
|
||||||
return TMUX_VERSION;
|
return (TMUX_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -308,7 +308,7 @@ window_buffer_get_key(void *modedata, void *itemdata, u_int line)
|
|||||||
}
|
}
|
||||||
pb = paste_get_name(item->name);
|
pb = paste_get_name(item->name);
|
||||||
if (pb == NULL)
|
if (pb == NULL)
|
||||||
return KEYC_NONE;
|
return (KEYC_NONE);
|
||||||
|
|
||||||
ft = format_create(NULL, NULL, FORMAT_NONE, 0);
|
ft = format_create(NULL, NULL, FORMAT_NONE, 0);
|
||||||
format_defaults(ft, NULL, NULL, 0, NULL);
|
format_defaults(ft, NULL, NULL, 0, NULL);
|
||||||
@ -320,7 +320,7 @@ window_buffer_get_key(void *modedata, void *itemdata, u_int line)
|
|||||||
key = key_string_lookup_string(expanded);
|
key = key_string_lookup_string(expanded);
|
||||||
free(expanded);
|
free(expanded);
|
||||||
format_free(ft);
|
format_free(ft);
|
||||||
return key;
|
return (key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct screen *
|
static struct screen *
|
||||||
|
@ -281,7 +281,7 @@ window_client_get_key(void *modedata, void *itemdata, u_int line)
|
|||||||
key = key_string_lookup_string(expanded);
|
key = key_string_lookup_string(expanded);
|
||||||
free(expanded);
|
free(expanded);
|
||||||
format_free(ft);
|
format_free(ft);
|
||||||
return key;
|
return (key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct screen *
|
static struct screen *
|
||||||
|
@ -895,7 +895,7 @@ window_tree_get_key(void *modedata, void *itemdata, u_int line)
|
|||||||
key = key_string_lookup_string(expanded);
|
key = key_string_lookup_string(expanded);
|
||||||
free(expanded);
|
free(expanded);
|
||||||
format_free(ft);
|
format_free(ft);
|
||||||
return key;
|
return (key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct screen *
|
static struct screen *
|
||||||
|
2
window.c
2
window.c
@ -1056,7 +1056,7 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
|
|||||||
if (sx == wp->sx && sy == wp->sy)
|
if (sx == wp->sx && sy == wp->sy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
r = xmalloc (sizeof *r);
|
r = xmalloc(sizeof *r);
|
||||||
r->sx = sx;
|
r->sx = sx;
|
||||||
r->sy = sy;
|
r->sy = sy;
|
||||||
r->osx = wp->sx;
|
r->osx = wp->sx;
|
||||||
|
Loading…
Reference in New Issue
Block a user