diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-05-25 16:39:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-05-25 17:50:42 +0200 |
commit | fd5986be246f8488d019e80428a524d97e45e59e (patch) | |
tree | 1d4d832e1f71c1ef08d023b024f03b7f528b5c5f | |
parent | ec6cdb57fc642c5292d12de5e3bb82bbddc7a813 (diff) |
createSocketImpl is always called with the same argument
Change-Id: I15d442a36407ebfecefe7adf594bffbf1204443e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94796
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | sal/osl/unx/socket.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 239a8dcb248d..4f67795a60ee 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -283,13 +283,13 @@ static sal_Int32 osl_psz_getServicePort ( static void osl_psz_getLastSocketErrorDescription ( oslSocket Socket, char* pBuffer, sal_uInt32 BufferSize); -static oslSocket createSocketImpl(int Socket) +static oslSocket createSocketImpl() { oslSocket pSocket; pSocket = static_cast<oslSocket>(calloc(1, sizeof(struct oslSocketImpl))); - pSocket->m_Socket = Socket; + pSocket->m_Socket = OSL_INVALID_SOCKET; pSocket->m_nLastError = 0; pSocket->m_nRefCount = 1; @@ -1104,7 +1104,7 @@ oslSocket SAL_CALL osl_createSocket( oslSocket pSocket; /* alloc memory */ - pSocket= createSocketImpl(OSL_INVALID_SOCKET); + pSocket= createSocketImpl(); /* create socket */ pSocket->m_Socket= socket(FAMILY_TO_NATIVE(Family), @@ -1520,7 +1520,7 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket pSocket, } /* alloc memory */ - pConnectionSockImpl= createSocketImpl(OSL_INVALID_SOCKET); + pConnectionSockImpl= createSocketImpl(); /* set close-on-exec flag */ if ((Flags = fcntl(Connection, F_GETFD, 0)) != -1) |