summaryrefslogtreecommitdiffhomepage
path: root/tcp-accept.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-06-03 09:41:09 +0800
committerGitHub <noreply@github.com>2017-06-03 09:41:09 +0800
commit4bba3268d5ad0a450f0f3d1b07cd600add47062b (patch)
tree079f7af36bf97dfa3bbe15650b0643351c045b34 /tcp-accept.c
parent92c4f20089ec1f408e0147911631b750617b0ec9 (diff)
parent5f76e4c1ede157ca5a51c2189984e8ee57778d86 (diff)
Merge pull request #40 from fperrad/20161119_lint
more lintings
Diffstat (limited to 'tcp-accept.c')
-rw-r--r--tcp-accept.c8
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);