mirror of https://github.com/martanne/abduco
Correct function definitions without parameters
This commit is contained in:
parent
94051967ff
commit
35117affb9
6
abduco.c
6
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);
|
||||
|
|
|
|||
6
client.c
6
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,
|
||||
|
|
|
|||
6
server.c
6
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue