diff options
author | Francois Perrad <francois.perrad@gadz.org> | 2016-11-19 15:07:42 +0100 |
---|---|---|
committer | Francois Perrad <francois.perrad@gadz.org> | 2017-06-01 19:15:07 +0200 |
commit | 206b9cea0d1920d3eec00807dbb1af373493baaa (patch) | |
tree | f19006ce7b78de238d2d5e6cff7f241706b07a01 /tcp-accept.c | |
parent | 9dcb04a1e08990d3f95656c8f73d145c2121c75e (diff) |
rename hidden variable
in function tcp_acceptor()
struct sockaddr_storage addr;
char* addr = NULL;
Diffstat (limited to 'tcp-accept.c')
-rw-r--r-- | tcp-accept.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tcp-accept.c b/tcp-accept.c index 04fa25f..82f4a86 100644 --- a/tcp-accept.c +++ b/tcp-accept.c @@ -55,19 +55,19 @@ int tcp_prio_inithandler(struct Channel* channel) static void tcp_acceptor(struct Listener *listener, int sock) { int fd; - struct sockaddr_storage addr; + struct sockaddr_storage sa; socklen_t len; char ipstring[NI_MAXHOST], portstring[NI_MAXSERV]; struct TCPListener *tcpinfo = (struct TCPListener*)(listener->typedata); - len = sizeof(addr); + len = sizeof(sa); - fd = accept(sock, (struct sockaddr*)&addr, &len); + fd = accept(sock, (struct sockaddr*)&sa, &len); if (fd < 0) { return; } - if (getnameinfo((struct sockaddr*)&addr, len, ipstring, sizeof(ipstring), + if (getnameinfo((struct sockaddr*)&sa, len, ipstring, sizeof(ipstring), portstring, sizeof(portstring), NI_NUMERICHOST | NI_NUMERICSERV) != 0) { m_close(fd); |