[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon May 25 15:51:25 UTC 2020


 sal/osl/unx/socket.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit fd5986be246f8488d019e80428a524d97e45e59e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon May 25 16:39:39 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon May 25 17:50:42 2020 +0200

    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 at redhat.com>

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)


More information about the Libreoffice-commits mailing list