From 49a03587ef8be861d6dd7d6233b5040ae13f3c8a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 2 Jan 2022 22:20:48 -0800 Subject: indent --- src/luasocket/inet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/luasocket/inet.c b/src/luasocket/inet.c index ec73fea..fabbffc 100644 --- a/src/luasocket/inet.c +++ b/src/luasocket/inet.c @@ -248,7 +248,7 @@ int inet_meth_getpeername(lua_State *L, p_socket ps, int family) lua_pushstring(L, socket_strerror(errno)); return 2; } - err = getnameinfo((struct sockaddr *) &peer, peer_len, + err = getnameinfo((struct sockaddr *) &peer, peer_len, name, INET6_ADDRSTRLEN, port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV); if (err) { @@ -282,8 +282,8 @@ int inet_meth_getsockname(lua_State *L, p_socket ps, int family) lua_pushstring(L, socket_strerror(errno)); return 2; } - err=getnameinfo((struct sockaddr *)&peer, peer_len, - name, INET6_ADDRSTRLEN, port, 6, NI_NUMERICHOST | NI_NUMERICSERV); + err=getnameinfo((struct sockaddr *)&peer, peer_len, + name, INET6_ADDRSTRLEN, port, 6, NI_NUMERICHOST | NI_NUMERICSERV); if (err) { lua_pushnil(L); lua_pushstring(L, gai_strerror(err)); @@ -433,14 +433,14 @@ const char *inet_tryconnect(p_socket ps, int *family, const char *address, \*-------------------------------------------------------------------------*/ const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm) { - socklen_t len; - t_sockaddr_storage addr; + socklen_t len; + t_sockaddr_storage addr; switch (family) { case AF_INET6: len = sizeof(struct sockaddr_in6); break; case AF_INET: len = sizeof(struct sockaddr_in); break; default: len = sizeof(addr); break; } - return socket_strerror(socket_accept(server, client, (SA *) &addr, + return socket_strerror(socket_accept(server, client, (SA *) &addr, &len, tm)); } -- cgit 1.4.1-2-gfad0