use SAL_WARN_IF here instead

Change-Id: Iaeac042caec04e5bda5c23d22995e509e9fe824a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175862
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-10-31 09:21:57 +00:00
parent 92de9528f4
commit f9af5beb9d

View file

@ -427,8 +427,6 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
void* pBuffer,
sal_Int32 BytesToRead)
{
int nRet = 0;
SAL_WARN_IF(!pPipe, "sal.osl.pipe", "osl_receivePipe: invalid pipe");
if (!pPipe)
{
@ -437,10 +435,9 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
return -1;
}
nRet = recv(pPipe->m_Socket, pBuffer, BytesToRead, 0);
sal_Int32 nRet = recv(pPipe->m_Socket, pBuffer, BytesToRead, 0);
if (nRet < 0)
SAL_WARN("sal.osl.pipe", "recv() failed: " << UnixErrnoString(errno));
SAL_WARN_IF(nRet < 0, "sal.osl.pipe", "recv() failed: " << UnixErrnoString(errno));
return nRet;
}