summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-08-28 10:17:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-08-28 10:17:35 +0200
commit8b63825dc2e2c271b9109c32a27e1ea246f7d87e (patch)
treee1c400464be3c7e35fa5406125983ccfd30e51ab /sal
parent722e3cee97555ad0ace78f9feb80a137e8498099 (diff)
Fix type of errno/WSAGetLastError()
...as got broken with 3d5be8cd31bcf6fce8772133298d2ae076361362 "osl: give warning on socket error (win32), move Flag definition (unx)" Change-Id: Ib68540596b0bc2cda3e809e765c7d41ca45dda71
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/socket.cxx4
-rw-r--r--sal/osl/w32/socket.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index b3ca2bb83191..f7a98efafc82 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -1153,7 +1153,7 @@ oslSocket SAL_CALL osl_createSocket(
/* creation failed => free memory */
if(pSocket->m_Socket == OSL_INVALID_SOCKET)
{
- sal_Int32 nErrno = errno;
+ int nErrno = errno;
SAL_WARN( "sal.osl", "socket creation failed: (" << nErrno << ") " << strerror(nErrno) );
destroySocketImpl(pSocket);
@@ -1169,7 +1169,7 @@ oslSocket SAL_CALL osl_createSocket(
if (fcntl(pSocket->m_Socket, F_SETFD, nFlags) == -1)
{
pSocket->m_nLastError=errno;
- sal_uInt32 nErrno = errno;
+ int nErrno = errno;
SAL_WARN( "sal.osl", "failed changing socket flags: (" << nErrno << ") " << strerror(nErrno) );
}
}
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 6ae42e557515..b1d8af3a9970 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -790,7 +790,7 @@ oslSocket SAL_CALL osl_createSocket(
/* creation failed => free memory */
if(pSocket->m_Socket == OSL_INVALID_SOCKET)
{
- sal_uInt32 nErrno = WSAGetLastError();
+ int nErrno = WSAGetLastError();
wchar_t *sErr = nullptr;
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, nErrno,