abduco

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

commit 35117affb9985176ff95083fb5a278a7c06a5b4a
parent 94051967ffc265f92bdc90533043e0675ee41f54
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 10 Oct 2014 20:43:06 +0200

Correct function definitions without parameters

Diffstat:
abduco.c | 6+++---
client.c | 6+++---
server.c | 6+++---
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/abduco.c b/abduco.c @@ -209,12 +209,12 @@ static void die(const char *s) { exit(EXIT_FAILURE); } -static void usage() { +static void usage(void) { fprintf(stderr, "usage: abduco [-a|-A|-c|-n] [-r] [-e detachkey] name command\n"); exit(EXIT_FAILURE); } -static int create_socket_dir() { +static int create_socket_dir(void) { size_t maxlen = sizeof(sockaddr.sun_path); char *dirs[] = { getenv("HOME"), getenv("TMPDIR"), "/tmp" }; int socketfd = socket(AF_UNIX, SOCK_STREAM, 0); @@ -440,7 +440,7 @@ static int session_comparator(const struct dirent **a, const struct dirent **b) return sa.st_atime < sb.st_atime ? -1 : 1; } -static int list_session() { +static int list_session(void) { if (create_socket_dir() == -1) return 1; chdir(sockaddr.sun_path); diff --git a/client.c b/client.c @@ -21,18 +21,18 @@ static bool client_recv_packet(Packet *pkt) { return false; } -static void client_show_cursor() { +static void client_show_cursor(void) { printf("\033[?25h"); fflush(stdout); } -static void client_restore_terminal() { +static void client_restore_terminal(void) { if (has_term) tcsetattr(STDIN_FILENO, TCSADRAIN, &orig_term); client_show_cursor(); } -static int client_mainloop() { +static int client_mainloop(void) { client.need_resize = true; Packet pkt = { .type = MSG_ATTACH, diff --git a/server.c b/server.c @@ -57,7 +57,7 @@ static int server_set_socket_non_blocking(int sock) { return fcntl(sock, F_SETFL, flags | O_NONBLOCK); } -static Client *server_accept_client() { +static Client *server_accept_client(void) { int newfd = accept(server.socket, NULL, NULL); if (newfd == -1) return NULL; @@ -143,11 +143,11 @@ static void server_sigusr1_handler(int sig) { } } -static void server_atexit_handler() { +static void server_atexit_handler(void) { unlink(sockaddr.sun_path); } -static void server_mainloop() { +static void server_mainloop(void) { atexit(server_atexit_handler); fd_set new_readfds, new_writefds; FD_ZERO(&new_readfds);