Some style nits.

This commit is contained in:
Nicholas Marriott 2022-04-06 16:39:46 +01:00
parent 0c84a20d2f
commit 3a6d82b7c8
16 changed files with 20 additions and 20 deletions

View File

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

View File

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

View File

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

View File

@ -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
View File

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

View File

@ -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
View File

@ -202,7 +202,7 @@ proc_start(const char *name)
#endif
, event_get_version(), event_get_method()
#ifdef HAVE_UTF8PROC
, utf8proc_version ()
, utf8proc_version()
#endif
);

View File

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

View File

@ -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. */

View File

@ -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
View File

@ -325,7 +325,7 @@ find_home(void)
const char *
getversion(void)
{
return TMUX_VERSION;
return (TMUX_VERSION);
}
int

View File

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

View File

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

View File

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

View File

@ -1056,7 +1056,7 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
if (sx == wp->sx && sy == wp->sy)
return;
r = xmalloc (sizeof *r);
r = xmalloc(sizeof *r);
r->sx = sx;
r->sy = sy;
r->osx = wp->sx;