diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index 85595285..eb6e0d0c 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -72,7 +72,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_q *cmdq) buffer_ptr = xmalloc(sizeof *buffer_ptr); *buffer_ptr = buffer; - error = server_set_stdin_callback (c, cmd_load_buffer_callback, + error = server_set_stdin_callback(c, cmd_load_buffer_callback, buffer_ptr, &cause); if (error != 0) { cmdq_error(cmdq, "%s: %s", path, cause); diff --git a/cmd-set-option.c b/cmd-set-option.c index b661913f..046bebd6 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -172,7 +172,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) } /* Start or stop timers when automatic-rename changed. */ - if (strcmp (oe->name, "automatic-rename") == 0) { + if (strcmp(oe->name, "automatic-rename") == 0) { for (i = 0; i < ARRAY_LENGTH(&windows); i++) { if ((w = ARRAY_ITEM(&windows, i)) == NULL) continue; diff --git a/cmd-show-messages.c b/cmd-show-messages.c index a3938e0a..45358fde 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -49,12 +49,12 @@ const struct cmd_entry cmd_server_info_entry = { cmd_show_messages_exec }; -void cmd_show_messages_server (struct cmd_q *); -void cmd_show_messages_terminals (struct cmd_q *); -void cmd_show_messages_jobs (struct cmd_q *); +void cmd_show_messages_server(struct cmd_q *); +void cmd_show_messages_terminals(struct cmd_q *); +void cmd_show_messages_jobs(struct cmd_q *); void -cmd_show_messages_server (struct cmd_q *cmdq) +cmd_show_messages_server(struct cmd_q *cmdq) { char *tim; @@ -68,7 +68,7 @@ cmd_show_messages_server (struct cmd_q *cmdq) } void -cmd_show_messages_terminals (struct cmd_q *cmdq) +cmd_show_messages_terminals(struct cmd_q *cmdq) { struct tty_term *term; const struct tty_term_code_entry *ent; @@ -111,7 +111,7 @@ cmd_show_messages_terminals (struct cmd_q *cmdq) } void -cmd_show_messages_jobs (struct cmd_q *cmdq) +cmd_show_messages_jobs(struct cmd_q *cmdq) { struct job *job; u_int n; @@ -136,20 +136,20 @@ cmd_show_messages_exec(struct cmd *self, struct cmd_q *cmdq) int done; done = 0; - if (args_has (args, 'I') || self->entry == &cmd_server_info_entry) { - cmd_show_messages_server (cmdq); + if (args_has(args, 'I') || self->entry == &cmd_server_info_entry) { + cmd_show_messages_server(cmdq); done = 1; } - if (args_has (args, 'T') || self->entry == &cmd_server_info_entry) { + if (args_has(args, 'T') || self->entry == &cmd_server_info_entry) { if (done) - cmdq_print (cmdq, "%s", ""); - cmd_show_messages_terminals (cmdq); + cmdq_print(cmdq, "%s", ""); + cmd_show_messages_terminals(cmdq); done = 1; } - if (args_has (args, 'J') || self->entry == &cmd_server_info_entry) { + if (args_has(args, 'J') || self->entry == &cmd_server_info_entry) { if (done) - cmdq_print (cmdq, "%s", ""); - cmd_show_messages_jobs (cmdq); + cmdq_print(cmdq, "%s", ""); + cmd_show_messages_jobs(cmdq); done = 1; } if (done) diff --git a/grid.c b/grid.c index fb838adf..7fb15dc3 100644 --- a/grid.c +++ b/grid.c @@ -749,7 +749,7 @@ grid_reflow_split(struct grid *dst, u_int *py, struct grid_line *src_gl, dst_gl->flags |= GRID_LINE_WRAPPED; /* Copy the data. */ - memcpy (&dst_gl->celldata[0], &src_gl->celldata[offset], + memcpy(&dst_gl->celldata[0], &src_gl->celldata[offset], to_copy * sizeof dst_gl->celldata[0]); /* Move offset and reduce old line size. */ diff --git a/server-client.c b/server-client.c index 5a6cb7d9..5326f256 100644 --- a/server-client.c +++ b/server-client.c @@ -68,9 +68,9 @@ server_client_create(int fd) c->cmdq = cmdq_new(c); c->cmdq->client_exit = 1; - c->stdin_data = evbuffer_new (); - c->stdout_data = evbuffer_new (); - c->stderr_data = evbuffer_new (); + c->stdin_data = evbuffer_new(); + c->stdout_data = evbuffer_new(); + c->stderr_data = evbuffer_new(); c->tty.fd = -1; c->title = NULL; @@ -123,7 +123,7 @@ server_client_open(struct client *c, struct session *s, char **cause) return (0); if (!(c->flags & CLIENT_TERMINAL)) { - *cause = xstrdup ("not a terminal"); + *cause = xstrdup("not a terminal"); return (-1); } @@ -174,7 +174,7 @@ server_client_lost(struct client *c) evtimer_del(&c->identify_timer); free(c->message_string); - if (event_initialized (&c->message_timer)) + if (event_initialized(&c->message_timer)) evtimer_del(&c->message_timer); for (i = 0; i < ARRAY_LENGTH(&c->message_log); i++) { msg = &ARRAY_ITEM(&c->message_log, i); diff --git a/server-fn.c b/server-fn.c index d0747628..f585cb71 100644 --- a/server-fn.c +++ b/server-fn.c @@ -454,7 +454,7 @@ server_destroy_session(struct session *s) } void -server_check_unattached (void) +server_check_unattached(void) { struct session *s; @@ -480,7 +480,7 @@ server_set_identify(struct client *c) tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; - if (event_initialized (&c->identify_timer)) + if (event_initialized(&c->identify_timer)) evtimer_del(&c->identify_timer); evtimer_set(&c->identify_timer, server_callback_identify, c); evtimer_add(&c->identify_timer, &tv); @@ -592,7 +592,7 @@ server_set_stdin_callback(struct client *c, void (*cb)(struct client *, int, c->references++; if (c->stdin_closed) - c->stdin_callback (c, 1, c->stdin_callback_data); + c->stdin_callback(c, 1, c->stdin_callback_data); server_write_client(c, MSG_STDIN, NULL, 0); diff --git a/status.c b/status.c index 6966aadf..84589427 100644 --- a/status.c +++ b/status.c @@ -690,7 +690,7 @@ status_message_set(struct client *c, const char *fmt, ...) tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; - if (event_initialized (&c->message_timer)) + if (event_initialized(&c->message_timer)) evtimer_del(&c->message_timer); evtimer_set(&c->message_timer, status_message_callback, c); evtimer_add(&c->message_timer, &tv);