sal/osl/unx/file_misc.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b7bee6c10fc46754ea784c301efc2a5488c31b14
Author: Chris Sherlock <chris.sherloc...@gmail.com>
Date:   Wed Jul 5 12:11:35 2017 +1000

    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 <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>

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;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to