sal/osl/unx/pipe.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
New commits: commit f9af5beb9dab7bba089bc4b632cfa9c3047645e8 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Oct 31 09:21:57 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Oct 31 15:08:24 2024 +0100 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.mcnam...@collabora.com> diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index a4778bde66f6..c485f8da27f3 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -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; }