diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-24 16:32:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-27 08:47:38 +0200 |
commit | e6f4779de8fea16931967ce206439c5780d46125 (patch) | |
tree | dc898a89236247324e394815fe8bf821320c06c1 /sal/osl/unx/profile.cxx | |
parent | afd49c198769b5e7fc01a68ce7a6847aa0d0ddd8 (diff) |
directly use malloc/free in sal, instead of rtl_allocateMemory/etc
now that those functions are entirely malloc/free based, we can skip a
function call layer.
Change-Id: Ib091de0bdf4cdd58cee45185df17d96d3e8af402
Reviewed-on: https://gerrit.libreoffice.org/59576
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl/unx/profile.cxx')
-rw-r--r-- | sal/osl/unx/profile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index d103c4573d0a..4bd77901b247 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -1068,7 +1068,7 @@ static sal_Char* OslProfile_getLine(osl_TFile* pFile) SAL_INFO("sal.osl", "read failed " << strerror(errno)); if( pLine ) - rtl_freeMemory( pLine ); + free( pLine ); pLine = nullptr; break; } @@ -1088,11 +1088,11 @@ static sal_Char* OslProfile_getLine(osl_TFile* pFile) pChr++); Max = pChr - pFile->m_pReadPtr; - pNewLine = static_cast<sal_Char*>(rtl_allocateMemory( nLineBytes + Max + 1 )); + pNewLine = static_cast<sal_Char*>(malloc( nLineBytes + Max + 1 )); if( pLine ) { memcpy( pNewLine, pLine, nLineBytes ); - rtl_freeMemory( pLine ); + free( pLine ); } memcpy(pNewLine+nLineBytes, pFile->m_pReadPtr, Max); nLineBytes += Max; @@ -1546,7 +1546,7 @@ static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile) while ( ( pLine=OslProfile_getLine(pFile) ) != nullptr ) { sal_Char* bWasAdded = addLine( pProfile, pLine ); - rtl_freeMemory( pLine ); + free( pLine ); SAL_WARN_IF(!bWasAdded, "sal.osl", "addLine( pProfile, pLine ) ==> false"); if ( ! bWasAdded ) return false; |