diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-06-12 21:46:39 +1000 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-06-16 16:56:36 +0200 |
commit | e5772fbc810a4c76da2a200db70e7acd776bc30b (patch) | |
tree | fea9956688850fdc61030ad2562d1cb4628ef69d /sal/osl | |
parent | 50ca34f0ea353892c82ecd1317e5363486aee5e3 (diff) |
osl: signalshared.cxx no longer uses pVar (!=|==) nullptr expressions
Change-Id: I789051e4721cf9f0af13e1fdb128953c8ba2521e
Reviewed-on: https://gerrit.libreoffice.org/38696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/all/signalshared.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx index 9110ab1eb8c0..6865f0cacbcc 100644 --- a/sal/osl/all/signalshared.cxx +++ b/sal/osl/all/signalshared.cxx @@ -53,7 +53,7 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo) oslSignalHandlerImpl* pHandler = SignalList; oslSignalAction Action = osl_Signal_ActCallNextHdl; - while (pHandler != nullptr) + while (pHandler) { if ((Action = pHandler->Handler(pHandler->pData, pInfo)) != osl_Signal_ActCallNextHdl) @@ -68,17 +68,15 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo) oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler, void* pData) { OSL_ASSERT(handler != nullptr); - if (handler == nullptr) - { + if (!handler) return nullptr; - } - if (! bInitSignal) + if (!bInitSignal) bInitSignal = initSignal(); oslSignalHandlerImpl* pHandler = static_cast<oslSignalHandlerImpl*>(calloc(1, sizeof(oslSignalHandlerImpl))); - if (pHandler != nullptr) + if (pHandler) { pHandler->Handler = handler; pHandler->pData = pData; @@ -100,7 +98,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) { OSL_ASSERT(handler != nullptr); - if (! bInitSignal) + if (!bInitSignal) bInitSignal = initSignal(); osl_acquireMutex(SignalListMutex); @@ -108,7 +106,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) oslSignalHandlerImpl* pHandler = SignalList; oslSignalHandlerImpl* pPrevious = nullptr; - while (pHandler != nullptr) + while (pHandler) { if (pHandler == handler) { @@ -119,7 +117,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) osl_releaseMutex(SignalListMutex); - if (SignalList == nullptr) + if (!SignalList) bInitSignal = deInitSignal(); free(pHandler); @@ -138,15 +136,15 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 userSignal, void* userData) { - if (! bInitSignal) + if (!bInitSignal) bInitSignal = initSignal(); osl_acquireMutex(SignalListMutex); oslSignalInfo info; - info.Signal = osl_Signal_User; + info.Signal = osl_Signal_User; info.UserSignal = userSignal; - info.UserData = userData; + info.UserData = userData; oslSignalAction action = callSignalHandler(&info); |