From 4e956d545a52fe6b8310cfb30a26a89976d55cd9 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 1 Sep 2014 21:50:18 +0000 Subject: [PATCH] Various minor style and spacing nits. --- client.c | 4 ++-- cmd-list.c | 2 +- cmd-load-buffer.c | 2 +- cmd-new-window.c | 2 +- cmd-queue.c | 6 +++--- cmd-set-option.c | 4 ++-- cmd-split-window.c | 2 +- cmd-wait-for.c | 4 ++-- grid.c | 2 +- paste.c | 4 ++-- screen.c | 2 +- server-client.c | 2 +- tmux.h | 2 +- window-copy.c | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/client.c b/client.c index f5f5556d..e92724a2 100644 --- a/client.c +++ b/client.c @@ -311,7 +311,7 @@ client_main(int argc, char **argv, int flags) /* Prepare command for server. */ data->argc = argc; - if (cmd_pack_argv(argc, argv, (char*)(data + 1), size) != 0) { + if (cmd_pack_argv(argc, argv, (char *)(data + 1), size) != 0) { fprintf(stderr, "command too long\n"); free(data); return (1); @@ -393,7 +393,7 @@ client_write_one(enum msgtype type, int fd, const void *buf, size_t len) int retval; retval = imsg_compose(&client_ibuf, type, PROTOCOL_VERSION, -1, fd, - (void*)buf, len); + (void *)buf, len); if (retval != 1) return (-1); return (0); diff --git a/cmd-list.c b/cmd-list.c index 6dc4493a..0c75ed49 100644 --- a/cmd-list.c +++ b/cmd-list.c @@ -24,7 +24,7 @@ #include "tmux.h" struct cmd_list * -cmd_list_parse(int argc, char **argv, const char* file, u_int line, +cmd_list_parse(int argc, char **argv, const char *file, u_int line, char **cause) { struct cmd_list *cmdlist; diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index 6c69391c..26d6297a 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -62,7 +62,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_q *cmdq) path = args->argv[0]; if (strcmp(path, "-") == 0) { error = server_set_stdin_callback(c, cmd_load_buffer_callback, - (void*)bufname, &cause); + (void *)bufname, &cause); if (error != 0) { cmdq_error(cmdq, "%s: %s", path, cause); free(cause); diff --git a/cmd-new-window.c b/cmd-new-window.c index fc2eb120..00fa53f8 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -88,7 +88,7 @@ cmd_new_window_exec(struct cmd *self, struct cmd_q *cmdq) cmd = options_get_string(&s->options, "default-command"); if (cmd != NULL && *cmd != '\0') { argc = 1; - argv = (char**)&cmd; + argv = (char **)&cmd; } else { argc = 0; argv = NULL; diff --git a/cmd-queue.c b/cmd-queue.c index 7bc154a0..77460b2f 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -124,14 +124,14 @@ cmdq_guard(struct cmd_q *cmdq, const char *guard, int flags) struct client *c = cmdq->client; if (c == NULL) - return 0; + return (0); if (!(c->flags & CLIENT_CONTROL)) - return 0; + return (0); evbuffer_add_printf(c->stdout_data, "%%%s %ld %u %d\n", guard, (long) cmdq->time, cmdq->number, flags); server_push_stdout(c); - return 1; + return (1); } /* Add command list to queue and begin processing if needed. */ diff --git a/cmd-set-option.c b/cmd-set-option.c index d4743d55..5cea4932 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -201,7 +201,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) /* Set user option. */ enum cmd_retval -cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char* optstr, +cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char *optstr, const char *valstr) { struct args *args = self->args; @@ -254,7 +254,7 @@ cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char* optstr, if (args_has(args, 'o') && options_find1(oo, optstr) != NULL) { if (!args_has(args, 'q')) { cmdq_error(cmdq, "already set: %s", optstr); - return CMD_RETURN_ERROR; + return (CMD_RETURN_ERROR); } return (CMD_RETURN_NORMAL); } diff --git a/cmd-split-window.c b/cmd-split-window.c index 55231134..8a608bdb 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -85,7 +85,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq) cmd = options_get_string(&s->options, "default-command"); if (cmd != NULL && *cmd != '\0') { argc = 1; - argv = (char**)&cmd; + argv = (char **)&cmd; } else { argc = 0; argv = NULL; diff --git a/cmd-wait-for.c b/cmd-wait-for.c index 42c7f42d..3654d4e5 100644 --- a/cmd-wait-for.c +++ b/cmd-wait-for.c @@ -108,7 +108,7 @@ cmd_wait_for_signal(struct cmd_q *cmdq, const char *name, if (!wc->locked) { RB_REMOVE(wait_channels, &wait_channels, wc); - free((void*) wc->name); + free((void *)wc->name); free(wc); } @@ -186,7 +186,7 @@ cmd_wait_for_unlock(struct cmd_q *cmdq, const char *name, wc->locked = 0; if (TAILQ_EMPTY(&wc->waiters)) { RB_REMOVE(wait_channels, &wait_channels, wc); - free((void*) wc->name); + free((void *)wc->name); free(wc); } } diff --git a/grid.c b/grid.c index 28210185..784ff72f 100644 --- a/grid.c +++ b/grid.c @@ -572,7 +572,7 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx, const struct grid_cell *gc; static struct grid_cell lastgc1; struct utf8_data ud; - const char* data; + const char *data; char *buf, code[128]; size_t len, off, size, codelen; u_int xx; diff --git a/paste.c b/paste.c index 586fbec8..e8ea0c34 100644 --- a/paste.c +++ b/paste.c @@ -102,7 +102,7 @@ paste_get_name(const char *name) if (name == NULL || *name == '\0') return (NULL); - pbfind.name = (char*)name; + pbfind.name = (char *)name; return (RB_FIND(paste_name_tree, &paste_by_name, &pbfind)); } @@ -115,7 +115,7 @@ paste_free_name(const char *name) if (name == NULL || *name == '\0') return (-1); - pbfind.name = (char*)name; + pbfind.name = (char *)name; pb = RB_FIND(paste_name_tree, &paste_by_name, &pbfind); if (pb == NULL) return (-1); diff --git a/screen.c b/screen.c index 3e7d9924..703f3e10 100644 --- a/screen.c +++ b/screen.c @@ -327,7 +327,7 @@ screen_check_selection(struct screen *s, u_int px, u_int py) return (0); if (py == sel->sy && px < sel->sx) - return 0; + return (0); if (py == sel->ey && px > sel->ex) return (0); diff --git a/server-client.c b/server-client.c index 4c58170f..093f0a15 100644 --- a/server-client.c +++ b/server-client.c @@ -914,7 +914,7 @@ server_client_msg_command(struct client *c, struct imsg *imsg) fatalx("bad MSG_COMMAND size"); memcpy(&data, imsg->data, sizeof data); - buf = (char*)imsg->data + sizeof data; + buf = (char *)imsg->data + sizeof data; len = imsg->hdr.len - IMSG_HEADER_SIZE - sizeof data; if (len > 0 && buf[len - 1] != '\0') fatalx("bad MSG_COMMAND string"); diff --git a/tmux.h b/tmux.h index bfc70544..c64459ba 100644 --- a/tmux.h +++ b/tmux.h @@ -2325,7 +2325,7 @@ void set_signals(void(*)(int, short, void *)); void clear_signals(int); /* control.c */ -void control_callback(struct client *, int, void*); +void control_callback(struct client *, int, void *); void printflike2 control_write(struct client *, const char *, ...); void control_write_buffer(struct client *, struct evbuffer *); diff --git a/window-copy.c b/window-copy.c index cb8ef57f..c9ddf84f 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1498,8 +1498,8 @@ window_copy_copy_pipe(struct window_pane *wp, struct session *sess, void window_copy_copy_selection(struct window_pane *wp, const char *bufname) { - void* buf; - size_t len; + void *buf; + size_t len; buf = window_copy_get_selection(wp, &len); if (buf == NULL)