summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inspsocket.cpp2
-rw-r--r--src/socket.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 258dd4472..1ec32742e 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -98,7 +98,7 @@ bool BufferedSocket::DoBindMagic(const std::string &current_ip)
return false;
}
- if (ServerInstance->SE->Bind(this->fd, &s.sa, sizeof(s)) < 0)
+ if (ServerInstance->SE->Bind(this->fd, &s.sa, sa_size(s)) < 0)
{
this->state = I_ERROR;
this->OnError(I_ERR_BIND);
diff --git a/src/socket.cpp b/src/socket.cpp
index 3b0c63931..d8e710d56 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -61,7 +61,7 @@ bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten)
#endif
}
}
- ret = SE->Bind(sockfd, &servaddr.sa, sizeof(servaddr));
+ ret = SE->Bind(sockfd, &servaddr.sa, sa_size(servaddr));
if (ret < 0)
{