diff options
Diffstat (limited to 'tools/source/generic/config.cxx')
-rw-r--r-- | tools/source/generic/config.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index a9ee7f1cc274..f27542070fb2 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -410,21 +410,14 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uInt32& if ( !nBufLen ) { pWriteBuf = new sal_uInt8[nLineEndLen]; - if ( pWriteBuf ) - { - pWriteBuf[0] = aLineEndBuf[0]; - if ( nLineEndLen == 2 ) - pWriteBuf[1] = aLineEndBuf[1]; - return pWriteBuf; - } - else - return nullptr; + pWriteBuf[0] = aLineEndBuf[0]; + if ( nLineEndLen == 2 ) + pWriteBuf[1] = aLineEndBuf[1]; + return pWriteBuf; } // Allocate new write buffer (caller frees it) pWriteBuf = new sal_uInt8[nBufLen]; - if ( !pWriteBuf ) - return nullptr; // fill buffer pBuf = pWriteBuf; |