From 3e8355bd15d76a0b1ae5fe25085a5e74afed9b73 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 30 May 2022 12:55:25 +0000 Subject: [PATCH] Spacing/style nits. --- usr.bin/tmux/cmd-command-prompt.c | 4 ++-- usr.bin/tmux/cmd-queue.c | 4 ++-- usr.bin/tmux/cmd-refresh-client.c | 4 ++-- usr.bin/tmux/format.c | 4 ++-- usr.bin/tmux/log.c | 4 ++-- usr.bin/tmux/notify.c | 4 ++-- usr.bin/tmux/screen.c | 6 +++--- usr.bin/tmux/server-acl.c | 8 ++++---- usr.bin/tmux/server-client.c | 4 ++-- usr.bin/tmux/window-buffer.c | 6 +++--- usr.bin/tmux/window-client.c | 4 ++-- usr.bin/tmux/window-tree.c | 4 ++-- usr.bin/tmux/window.c | 4 ++-- 13 files changed, 30 insertions(+), 30 deletions(-) diff --git a/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c index d63f7d3d841..68faef7ebb1 100644 --- a/usr.bin/tmux/cmd-command-prompt.c +++ b/usr.bin/tmux/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-command-prompt.c,v 1.64 2021/09/22 15:21:44 nicm Exp $ */ +/* $OpenBSD: cmd-command-prompt.c,v 1.65 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -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 diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index dfed88a5cf4..15c4f7fe567 100644 --- a/usr.bin/tmux/cmd-queue.c +++ b/usr.bin/tmux/cmd-queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-queue.c,v 1.108 2022/05/30 12:48:57 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.109 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott @@ -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); } diff --git a/usr.bin/tmux/cmd-refresh-client.c b/usr.bin/tmux/cmd-refresh-client.c index eb7db1e489a..e1af3e859e4 100644 --- a/usr.bin/tmux/cmd-refresh-client.c +++ b/usr.bin/tmux/cmd-refresh-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-refresh-client.c,v 1.47 2022/03/08 12:01:19 nicm Exp $ */ +/* $OpenBSD: cmd-refresh-client.c,v 1.48 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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; } diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 9a2ab01ebbc..951915f0f1a 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.302 2022/03/08 18:31:46 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.303 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -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. */ diff --git a/usr.bin/tmux/log.c b/usr.bin/tmux/log.c index 41e6629c9c0..8249b66ba5b 100644 --- a/usr.bin/tmux/log.c +++ b/usr.bin/tmux/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.30 2021/09/10 15:03:18 nicm Exp $ */ +/* $OpenBSD: log.c,v 1.31 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -144,7 +144,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); diff --git a/usr.bin/tmux/notify.c b/usr.bin/tmux/notify.c index d4eaea6f46e..cdb5fef6e44 100644 --- a/usr.bin/tmux/notify.c +++ b/usr.bin/tmux/notify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: notify.c,v 1.40 2022/03/08 21:58:37 nicm Exp $ */ +/* $OpenBSD: notify.c,v 1.41 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman @@ -47,7 +47,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)); diff --git a/usr.bin/tmux/screen.c b/usr.bin/tmux/screen.c index ccb731ab0ae..41de516db35 100644 --- a/usr.bin/tmux/screen.c +++ b/usr.bin/tmux/screen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.79 2022/04/01 10:11:59 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.80 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -662,9 +662,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) diff --git a/usr.bin/tmux/server-acl.c b/usr.bin/tmux/server-acl.c index bb9658e4e20..52851806136 100644 --- a/usr.bin/tmux/server-acl.c +++ b/usr.bin/tmux/server-acl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-acl.c,v 1.1 2022/05/30 12:48:57 nicm Exp $ */ +/* $OpenBSD: server-acl.c,v 1.2 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2021 Holland Schutte, Jayson Morberg @@ -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. */ diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 6e64188e16a..adb2e9056ef 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.394 2022/05/30 12:48:57 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.395 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -3157,7 +3157,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. */ diff --git a/usr.bin/tmux/window-buffer.c b/usr.bin/tmux/window-buffer.c index 82a1a797f45..73c1fe0b735 100644 --- a/usr.bin/tmux/window-buffer.c +++ b/usr.bin/tmux/window-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-buffer.c,v 1.35 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: window-buffer.c,v 1.36 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -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 * diff --git a/usr.bin/tmux/window-client.c b/usr.bin/tmux/window-client.c index 3a572d880ee..c6b79f8597e 100644 --- a/usr.bin/tmux/window-client.c +++ b/usr.bin/tmux/window-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-client.c,v 1.32 2021/08/20 19:50:17 nicm Exp $ */ +/* $OpenBSD: window-client.c,v 1.33 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -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 * diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c index ce349fe4a3c..c2c9b56c1da 100644 --- a/usr.bin/tmux/window-tree.c +++ b/usr.bin/tmux/window-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-tree.c,v 1.59 2021/10/20 09:50:40 nicm Exp $ */ +/* $OpenBSD: window-tree.c,v 1.60 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -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 * diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 4aba6e0b3ef..7ca42aef8c0 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.279 2022/03/16 17:00:17 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.280 2022/05/30 12:55:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1046,7 +1046,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; -- 2.20.1