summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-07-05 12:11:35 +1000
committerMichael Stahl <mstahl@redhat.com>2017-07-07 21:16:25 +0200
commitb7bee6c10fc46754ea784c301efc2a5488c31b14 (patch)
treecda65428202951096d6d4f5b0fe4498f0125c801 /sal
parenta62507eb405961c27ebf79d6b9bdd7a106d06123 (diff)
osl: osl_closeDirectory cleanup
When I was reading this code, it wasn't entirely clear to me without looking at the typedef of oslDirectory whether I was dealing with a variable or a pointer, so I have changed this to pDirectory. I also made a small tweak to the whitespace to help readability. I also changed from explicit comparison to nullptr to the more conventional style. Change-Id: I4e9a69575733ab71a175d14a30c1976e6771ed5b Reviewed-on: https://gerrit.libreoffice.org/39536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file_misc.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 816a4f729405..5ff4d62bb4d2 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -224,33 +224,33 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString* ustrDirectoryURL, oslDirect
return oslTranslateFileError(OSL_FET_ERROR, errno);
}
-oslFileError SAL_CALL osl_closeDirectory( oslDirectory Directory )
+oslFileError SAL_CALL osl_closeDirectory(oslDirectory pDirectory)
{
- oslDirectoryImpl* pDirImpl = static_cast<oslDirectoryImpl*>(Directory);
+ oslDirectoryImpl* pDirImpl = static_cast<oslDirectoryImpl*>(pDirectory);
oslFileError err = osl_File_E_None;
- OSL_ASSERT( Directory );
+ OSL_ASSERT(pDirectory);
- if( pDirImpl == nullptr )
+ if (!pDirImpl)
return osl_File_E_INVAL;
#ifdef ANDROID
- if( pDirImpl->eKind == oslDirectoryImpl::KIND_ASSETS )
+ if (pDirImpl->eKind == oslDirectoryImpl::KIND_ASSETS)
{
- if (lo_apk_closedir( pDirImpl->pApkDirStruct ))
+ if (lo_apk_closedir(pDirImpl->pApkDirStruct))
err = osl_File_E_IO;
}
else
#endif
{
- if( closedir( pDirImpl->pDirStruct ) )
+ if (closedir( pDirImpl->pDirStruct))
err = oslTranslateFileError(OSL_FET_ERROR, errno);
}
/* cleanup members */
- rtl_uString_release( pDirImpl->ustrPath );
+ rtl_uString_release(pDirImpl->ustrPath);
- rtl_freeMemory( pDirImpl );
+ rtl_freeMemory(pDirImpl);
return err;
}