Kaydet (Commit) bb053e86 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove questionable asserts

Both osl_add/removeSignalHandler apparently handle !handler gracefully (the
former even including explicit code for that case, which doesn't fit with having
an assert), and before bca760c2 "tdf#43157 -
osl: convert OSL_ASSERTs to assert in signalshared.cxx" those asserts were
merely OSL_ASSERTs.  So keep this published API accepting !handler (even if the
documentation is silent on this).

Change-Id: I63512916a66a2a58b932174ec5d92ce612c236a2
üst 45c06838
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <cassert>
#include <sal/config.h> #include <sal/config.h>
#include <signalshared.hxx> #include <signalshared.hxx>
...@@ -68,8 +67,6 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo) ...@@ -68,8 +67,6 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo)
oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler, void* pData) oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler, void* pData)
{ {
assert(handler);
if (!handler) if (!handler)
return nullptr; return nullptr;
...@@ -98,8 +95,6 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler, ...@@ -98,8 +95,6 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler,
sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler)
{ {
assert(handler);
if (!bInitSignal) if (!bInitSignal)
bInitSignal = initSignal(); bInitSignal = initSignal();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment