summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/TCP_server.c4
-rw-r--r--toxcore/TCP_server.h4
-rw-r--r--toxcore/list.c2
3 files changed, 4 insertions, 6 deletions
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)
990 } 990 }
991} 991}
992 992
993static int do_confirmed_recv(TCP_Server *TCP_server, uint32_t i) 993static void do_confirmed_recv(TCP_Server *TCP_server, uint32_t i)
994{ 994{
995 TCP_Secure_Connection *conn = &TCP_server->accepted_connection_array[i]; 995 TCP_Secure_Connection *conn = &TCP_server->accepted_connection_array[i];
996 996
@@ -1130,8 +1130,6 @@ static void do_TCP_epoll(TCP_Server *TCP_server)
1130 1130
1131 sock_new = accept(sock, (struct sockaddr *)&addr, &addrlen); 1131 sock_new = accept(sock, (struct sockaddr *)&addr, &addrlen);
1132 1132
1133 struct sockaddr a = *(struct sockaddr *)&addr;
1134
1135 int index_new = TCP_server->incomming_connection_queue_index % MAX_INCOMMING_CONNECTIONS; 1133 int index_new = TCP_server->incomming_connection_queue_index % MAX_INCOMMING_CONNECTIONS;
1136 1134
1137 if (!accept_connection(TCP_server, sock_new)) { 1135 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 {
108typedef struct { 108typedef struct {
109 Onion *onion; 109 Onion *onion;
110 110
111 #ifdef TCP_SERVER_USE_EPOLL 111#ifdef TCP_SERVER_USE_EPOLL
112 int efd; 112 int efd;
113 #endif 113#endif
114 sock_t *socks_listening; 114 sock_t *socks_listening;
115 unsigned int num_listening_socks; 115 unsigned int num_listening_socks;
116 116
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)
124 124
125 //return only -1 and positive values 125 //return only -1 and positive values
126 if (r < 0) { 126 if (r < 0) {
127 r = -1; 127 return -1;
128 } 128 }
129 129
130 return list->ids[r]; 130 return list->ids[r];