abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit f4d3f21f00384a2ec1ac80a4240888824ae7e298
parent eccf9fd16e39fe676af58cdf16b8b5c5720c6f97
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sat, 22 Mar 2014 17:38:17 +0100

Source code formatting changes

Diffstat:
client.c | 7++++++-
server.c | 11+++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/client.c b/client.c @@ -34,8 +34,13 @@ static void client_restore_terminal() { static int client_mainloop() { client.need_resize = true; - Packet pkt = { .type = MSG_ATTACH, .u = { .b = client.readonly }, .len = sizeof(pkt.u.b) }; + Packet pkt = { + .type = MSG_ATTACH, + .u = { .b = client.readonly }, + .len = sizeof(pkt.u.b), + }; client_send_packet(&pkt); + while (server.running) { fd_set fds; FD_ZERO(&fds); diff --git a/server.c b/server.c @@ -180,7 +180,11 @@ static void server_mainloop() { pty_data = server_read_pty(&server_packet); if (!server.running && server.exit_status != -1 && server.clients) { /* application terminated */ - Packet pkt = { .type = MSG_EXIT, .len = sizeof(int), .u.i = server.exit_status }; + Packet pkt = { + .type = MSG_EXIT, + .u.i = server.exit_status, + .len = sizeof(pkt.u.i), + }; exit_pkt = &pkt; server.exit_status = -1; } @@ -192,7 +196,10 @@ static void server_mainloop() { client_free(c); *prev_next = c = t; if (first && server.clients) { - Packet pkt = { .type = MSG_RESIZE, .len = 0 }; + Packet pkt = { + .type = MSG_RESIZE, + .len = 0, + }; server_send_packet(server.clients, &pkt); } else if (!server.clients) { server_mark_socket_exec(false);