diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-06-25 08:03:48 +1000 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-25 12:00:45 +0200 |
commit | 609c0d268ff52c0566ad77dc54de2eeb4d5ef4f8 (patch) | |
tree | af2530ba41eb85aa57e61e59b9ee2cfa4b624c0c /sal/osl/unx/pipe.cxx | |
parent | dff3a597dad3b76990311ee356e0bd603753d8d3 (diff) |
osl: socket.cxx nullptr comparison cleanups
Change-Id: Ie0339482bf3a9b108e26008526bc5e73b761d27b
Reviewed-on: https://gerrit.libreoffice.org/39223
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl/unx/pipe.cxx')
-rw-r--r-- | sal/osl/unx/pipe.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index d7896df3c093..ead32377303f 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -80,7 +80,7 @@ static oslPipe createPipeImpl() oslPipe pPipeImpl; pPipeImpl = static_cast< oslPipe >(calloc(1, sizeof(struct oslPipeImpl))); - if (pPipeImpl == nullptr) + if (!pPipeImpl) return nullptr; pPipeImpl->m_nRefCount = 1; @@ -95,7 +95,7 @@ static oslPipe createPipeImpl() static void destroyPipeImpl(oslPipe pImpl) { - if (pImpl != nullptr) + if (pImpl) free(pImpl); } @@ -104,7 +104,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option oslPipe pPipe = nullptr; rtl_String* strPipeName = nullptr; - if (ustrPipeName != nullptr) + if (ustrPipeName) { rtl_uString2String(&strPipeName, rtl_uString_getStr(ustrPipeName), @@ -114,7 +114,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Option sal_Char* pszPipeName = rtl_string_getStr(strPipeName); pPipe = osl_psz_createPipe(pszPipeName, Options, Security); - if (strPipeName != nullptr) + if (strPipeName) rtl_string_release(strPipeName); } @@ -213,7 +213,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions /* alloc memory */ pPipe = createPipeImpl(); - if (pPipe == nullptr) + if (!pPipe) return nullptr; /* create socket */ @@ -319,7 +319,7 @@ void SAL_CALL osl_acquirePipe(oslPipe pPipe) void SAL_CALL osl_releasePipe(oslPipe pPipe) { - if(pPipe == nullptr) + if (!pPipe) return; if (osl_atomic_decrement(&(pPipe->m_nRefCount)) == 0) @@ -399,7 +399,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) oslPipe pAcceptedPipe; OSL_ASSERT(pPipe); - if (pPipe == nullptr) + if (!pPipe) return nullptr; OSL_ASSERT(strlen(pPipe->m_Name) > 0); @@ -432,7 +432,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) pAcceptedPipe = createPipeImpl(); OSL_ASSERT(pAcceptedPipe); - if(pAcceptedPipe==nullptr) + if (!pAcceptedPipe) { close(s); return nullptr; @@ -460,7 +460,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, OSL_ASSERT(pPipe); - if (pPipe == nullptr) + if (!pPipe) { SAL_WARN("sal.osl.pipe", "osl_receivePipe: Invalid socket"); errno=EINVAL; @@ -483,7 +483,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, OSL_ASSERT(pPipe); - if (pPipe == nullptr) + if (!pPipe) { SAL_WARN("sal.osl.pipe", "osl_sendPipe: Invalid socket"); errno=EINVAL; |