Give getsockopt() a reference to a socklen_t.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 28 Jun 2014 19:54:34 +0000 (21:54 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 28 Jun 2014 19:54:34 +0000 (21:54 +0200)
src/net_socket.c

index 3b6399bfc0cb9727a6e236700d2c24760ac18e33..b2297af4198231dea0f069d116161fb6a2b04f93 100644 (file)
@@ -421,7 +421,7 @@ static void handle_meta_io(void *data, int flags) {
                        if (!socknotconn(sockerrno))
                                socket_error = sockerrno;
                        else {
-                               int len = sizeof socket_error;
+                               socklen_t len = sizeof socket_error;
                                getsockopt(c->socket, SOL_SOCKET, SO_ERROR, (void *)&socket_error, &len);
                        }
                        if (socket_error) {