summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-07 10:15:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-07 10:48:25 +0100
commit0d78ad871e85a74a2a7eac2f2a2ff94776f35e77 (patch)
treea29ea7098cc49b1116db16f219bdc662e04ac874 /sal
parent807b696c5c15dc2d8255116305fd28ba60f201c0 (diff)
DBG_ASSERT->assert when followed by dereference
Change-Id: Ic1c999ffdc391ea01be5711721e7c9e63179473e
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/socket.c5
-rw-r--r--sal/rtl/byteseq.cxx3
2 files changed, 3 insertions, 5 deletions
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index fb6ced2ce77c..618bd7afc462 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -25,7 +25,7 @@
#include <osl/signal.h>
#include <rtl/alloc.h>
-
+#include <assert.h>
#include <ctype.h>
#include <sal/types.h>
@@ -552,8 +552,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr (
struct sockaddr* pAddr1 = NULL;
struct sockaddr* pAddr2 = NULL;
- OSL_ASSERT(Addr1);
- OSL_ASSERT(Addr2);
+ assert(Addr1 && Addr2);
pAddr1 = &(Addr1->m_sockaddr);
pAddr2 = &(Addr2->m_sockaddr);
diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx
index 5fd6022cfa75..f0f190125dce 100644
--- a/sal/rtl/byteseq.cxx
+++ b/sal/rtl/byteseq.cxx
@@ -216,8 +216,7 @@ void SAL_CALL rtl_byte_sequence_assign( sal_Sequence **ppSequence , sal_Sequence
sal_Bool SAL_CALL rtl_byte_sequence_equals( sal_Sequence *pSequence1 , sal_Sequence *pSequence2 )
SAL_THROW_EXTERN_C()
{
- OSL_ASSERT( pSequence1 );
- OSL_ASSERT( pSequence2 );
+ assert(pSequence1 && pSequence2);
if (pSequence1 == pSequence2)
{
return sal_True;