mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 01:58:46 +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;
|
||||
} else
|
||||
next_prompt = prompts = xstrdup (s);
|
||||
next_prompt = prompts = xstrdup(s);
|
||||
if ((s = args_get(args, 'I')) != NULL)
|
||||
next_input = inputs = xstrdup(s);
|
||||
else
|
||||
|
@ -126,7 +126,7 @@ cmdq_new(void)
|
||||
{
|
||||
struct cmdq_list *queue;
|
||||
|
||||
queue = xcalloc (1, sizeof *queue);
|
||||
queue = xcalloc(1, sizeof *queue);
|
||||
TAILQ_INIT (&queue->list);
|
||||
return (queue);
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ cmd_refresh_client_clipboard(struct cmd *self, struct cmdq_item *item)
|
||||
}
|
||||
if (i != tc->clipboard_npanes)
|
||||
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_panes[tc->clipboard_npanes++] = fs.wp->id;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# configure.ac
|
||||
|
||||
AC_INIT([tmux], next-3.4)
|
||||
AC_INIT([tmux], next-3.4)
|
||||
AC_PREREQ([2.60])
|
||||
|
||||
AC_CONFIG_AUX_DIR(etc)
|
||||
|
2
format.c
2
format.c
@ -2597,7 +2597,7 @@ format_cb_user(__unused struct format_tree *ft)
|
||||
|
||||
if ((pw = getpwuid(getuid())) != NULL)
|
||||
return (xstrdup(pw->pw_name));
|
||||
return NULL;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Format table type. */
|
||||
|
2
log.c
2
log.c
@ -143,7 +143,7 @@ fatal(const char *msg, ...)
|
||||
va_list ap;
|
||||
|
||||
if (snprintf(tmp, sizeof tmp, "fatal: %s: ", strerror(errno)) < 0)
|
||||
exit (1);
|
||||
exit(1);
|
||||
|
||||
va_start(ap, msg);
|
||||
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) {
|
||||
s = cmd_list_print(cmdlist, 0);
|
||||
log_debug("%s: hook %s is: %s", __func__, ne->name, s);
|
||||
free (s);
|
||||
free(s);
|
||||
}
|
||||
new_item = cmdq_get_command(cmdlist, state);
|
||||
return (cmdq_insert_after(item, new_item));
|
||||
|
2
proc.c
2
proc.c
@ -202,7 +202,7 @@ proc_start(const char *name)
|
||||
#endif
|
||||
, event_get_version(), event_get_method()
|
||||
#ifdef HAVE_UTF8PROC
|
||||
, utf8proc_version ()
|
||||
, utf8proc_version()
|
||||
#endif
|
||||
);
|
||||
|
||||
|
4
screen.c
4
screen.c
@ -661,9 +661,9 @@ screen_mode_to_string(int mode)
|
||||
static char tmp[1024];
|
||||
|
||||
if (mode == 0)
|
||||
return "NONE";
|
||||
return ("NONE");
|
||||
if (mode == ALL_MODES)
|
||||
return "ALL";
|
||||
return ("ALL");
|
||||
|
||||
*tmp = '\0';
|
||||
if (mode & MODE_CURSOR)
|
||||
|
@ -42,8 +42,8 @@ static int
|
||||
server_acl_cmp(struct server_acl_user *user1, struct server_acl_user *user2)
|
||||
{
|
||||
if (user1->uid < user2->uid)
|
||||
return -1;
|
||||
return user1->uid > user2->uid;
|
||||
return (-1);
|
||||
return (user1->uid > user2->uid);
|
||||
}
|
||||
|
||||
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 };
|
||||
|
||||
return RB_FIND(server_acl_entries, &server_acl_entries, &find);
|
||||
return (RB_FIND(server_acl_entries, &server_acl_entries, &find));
|
||||
}
|
||||
|
||||
/* Display the tree. */
|
||||
|
@ -3158,7 +3158,7 @@ server_client_add_client_window(struct client *c, u_int id)
|
||||
cw->window = id;
|
||||
RB_INSERT(client_windows, &c->windows, cw);
|
||||
}
|
||||
return cw;
|
||||
return (cw);
|
||||
}
|
||||
|
||||
/* Get client active pane. */
|
||||
|
2
tmux.c
2
tmux.c
@ -325,7 +325,7 @@ find_home(void)
|
||||
const char *
|
||||
getversion(void)
|
||||
{
|
||||
return TMUX_VERSION;
|
||||
return (TMUX_VERSION);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -308,7 +308,7 @@ window_buffer_get_key(void *modedata, void *itemdata, u_int line)
|
||||
}
|
||||
pb = paste_get_name(item->name);
|
||||
if (pb == NULL)
|
||||
return KEYC_NONE;
|
||||
return (KEYC_NONE);
|
||||
|
||||
ft = format_create(NULL, NULL, FORMAT_NONE, 0);
|
||||
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);
|
||||
free(expanded);
|
||||
format_free(ft);
|
||||
return key;
|
||||
return (key);
|
||||
}
|
||||
|
||||
static struct screen *
|
||||
|
@ -281,7 +281,7 @@ window_client_get_key(void *modedata, void *itemdata, u_int line)
|
||||
key = key_string_lookup_string(expanded);
|
||||
free(expanded);
|
||||
format_free(ft);
|
||||
return key;
|
||||
return (key);
|
||||
}
|
||||
|
||||
static struct screen *
|
||||
|
@ -895,7 +895,7 @@ window_tree_get_key(void *modedata, void *itemdata, u_int line)
|
||||
key = key_string_lookup_string(expanded);
|
||||
free(expanded);
|
||||
format_free(ft);
|
||||
return key;
|
||||
return (key);
|
||||
}
|
||||
|
||||
static struct screen *
|
||||
|
Loading…
Reference in New Issue
Block a user