diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 20:54:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 09:07:55 +0100 |
commit | 6b1d355988c0c51e3c6d8acd32184d79a8ea5011 (patch) | |
tree | 6bee67678242a070e8c061be2a66633305b04fb3 /sal | |
parent | 5e0b8b7980e26c66985abe9ade7e471266d91bae (diff) |
coverity#1241080 Dereference after null check
Change-Id: I82113fcd4182f9557ba0e7258498b5d4e798bf03
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/strtmpl.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index c50309e5cf81..a990159331b2 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -1768,9 +1768,8 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newTrim )( IMPL_RTL_STRINGDATA** ppThis, { nLen -= nPostSpaces+nPreSpaces; *ppThis = IMPL_RTL_STRINGNAME( ImplAlloc )( nLen ); - OSL_ASSERT(*ppThis != NULL); - if ( *ppThis ) - rtl_str_ImplCopy( (*ppThis)->buffer, pStr->buffer+nPreSpaces, nLen ); + assert(*ppThis); + rtl_str_ImplCopy( (*ppThis)->buffer, pStr->buffer+nPreSpaces, nLen ); } RTL_LOG_STRING_NEW( *ppThis ); |