[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Mon Jun 19 10:30:18 UTC 2017
sal/osl/all/signalshared.cxx | 5 -----
1 file changed, 5 deletions(-)
New commits:
commit bb053e86738d69af603b222532a898d355f51eec
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 19 12:24:26 2017 +0200
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 bca760c294c256fcb1fd3649dbf50f61a4bda474 "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
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx
index 816f20a2c808..9cf7fafc2de5 100644
--- a/sal/osl/all/signalshared.cxx
+++ b/sal/osl/all/signalshared.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <cassert>
#include <sal/config.h>
#include <signalshared.hxx>
@@ -68,8 +67,6 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo)
oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler, void* pData)
{
- assert(handler);
-
if (!handler)
return nullptr;
@@ -98,8 +95,6 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction handler,
sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler)
{
- assert(handler);
-
if (!bInitSignal)
bInitSignal = initSignal();
More information about the Libreoffice-commits
mailing list