diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c index e80c920c..fdab4870 100644 --- a/toxcore/TCP_server.c +++ b/toxcore/TCP_server.c @@ -990,7 +990,7 @@ static int do_unconfirmed(TCP_Server *TCP_server, uint32_t i) } } -static int do_confirmed_recv(TCP_Server *TCP_server, uint32_t i) +static void do_confirmed_recv(TCP_Server *TCP_server, uint32_t i) { TCP_Secure_Connection *conn = &TCP_server->accepted_connection_array[i]; @@ -1130,8 +1130,6 @@ static void do_TCP_epoll(TCP_Server *TCP_server) sock_new = accept(sock, (struct sockaddr *)&addr, &addrlen); - struct sockaddr a = *(struct sockaddr *)&addr; - int index_new = TCP_server->incomming_connection_queue_index % MAX_INCOMMING_CONNECTIONS; if (!accept_connection(TCP_server, sock_new)) { diff --git a/toxcore/TCP_server.h b/toxcore/TCP_server.h index d585c593..e2856726 100644 --- a/toxcore/TCP_server.h +++ b/toxcore/TCP_server.h @@ -108,9 +108,9 @@ typedef struct TCP_Secure_Connection { typedef struct { Onion *onion; - #ifdef TCP_SERVER_USE_EPOLL +#ifdef TCP_SERVER_USE_EPOLL int efd; - #endif +#endif sock_t *socks_listening; unsigned int num_listening_socks; diff --git a/toxcore/list.c b/toxcore/list.c index bf22f799..95ace12d 100644 --- a/toxcore/list.c +++ b/toxcore/list.c @@ -124,7 +124,7 @@ int list_find(LIST *list, void *data) //return only -1 and positive values if (r < 0) { - r = -1; + return -1; } return list->ids[r];