Browse files

fix type of 3rd argument of accept(2)

  • Loading branch information...
1 parent 963547c commit 5fb4925052868b4a712d1614d82dd87faf5a7479 @eldesh committed Apr 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/net.c
View
4 src/net.c
@@ -352,7 +352,7 @@ socket_t vsingle_accept(socket_t sock, bool (*serv)(socket_t, va_list), ...) {
return sock;
do {
struct sockaddr_in addr;
- int len=sizeof(addr);
+ socklen_t len = sizeof(addr);
socket_t acc=accept(sock, (struct sockaddr*)&addr, &len);
if (acc==INVALID_SOCKET) {
NANOLOG("accept failed <%d>\n", nanonet_error());
@@ -380,7 +380,7 @@ socket_t single_accept(socket_t sock, bool (*serv)(socket_t)) {
return sock;
do {
struct sockaddr_in addr;
- int len=sizeof(addr);
+ socklen_t len=sizeof(addr);
socket_t acc=accept(sock, (struct sockaddr*)&addr, &len);
if (acc==INVALID_SOCKET) {
NANOLOG("accept failed <%d>\n", nanonet_error());

0 comments on commit 5fb4925

Please sign in to comment.