diff options
Diffstat (limited to 'sal/osl/unx/profile.c')
-rw-r--r-- | sal/osl/unx/profile.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sal/osl/unx/profile.c b/sal/osl/unx/profile.c index c77a27543261..6d6184887d4e 100644 --- a/sal/osl/unx/profile.c +++ b/sal/osl/unx/profile.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,11 +197,8 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o { osl_TFile* pFile; osl_TProfileImpl* pProfile; - sal_Char Filename[PATH_MAX]; sal_Bool bRet = sal_False; - Filename[0] = '\0'; - #ifdef TRACE_OSL_PROFILE OSL_TRACE("In osl_openProfile\n"); #endif @@ -245,6 +243,7 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o if ( pProfile == 0 ) { + closeFileImpl(pFile, Flags); return 0; } @@ -275,7 +274,6 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) { osl_TProfileImpl* pProfile = (osl_TProfileImpl*)Profile; - sal_Bool bRet = sal_False; #ifdef TRACE_OSL_PROFILE OSL_TRACE("In osl_closeProfile\n"); @@ -309,8 +307,9 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) if ( pProfile != 0 ) { - bRet=storeProfile(pProfile, sal_True); + sal_Bool bRet = storeProfile(pProfile, sal_True); OSL_ASSERT(bRet); + (void)bRet; } } else @@ -561,6 +560,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, bRet=releaseProfile(pProfile); OSL_ASSERT(bRet); + (void)bRet; if ( pStr == 0 ) { @@ -1017,6 +1017,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const sal_C bRet=releaseProfile(pProfile); OSL_ASSERT(bRet); + (void)bRet; pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); @@ -1108,6 +1109,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff bRet=releaseProfile(pProfile); OSL_ASSERT(bRet); + (void)bRet; pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); @@ -2104,7 +2106,6 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, sal_Bool bWriteable) { osl_TProfileImpl* pProfile = (osl_TProfileImpl*)Profile; oslProfileOption PFlags=0; - sal_Bool bRet=sal_False; if ( bWriteable ) { @@ -2149,10 +2150,13 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, sal_Bool bWriteable) if (memcmp(&Stamp, &(pProfile->m_Stamp), sizeof(osl_TStamp))) { + sal_Bool bRet=sal_False; + pProfile->m_Stamp = Stamp; bRet=loadProfile(pProfile->m_pFile, pProfile); OSL_ASSERT(bRet); + (void)bRet; } } else @@ -2174,8 +2178,6 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, sal_Bool bWriteable) static sal_Bool releaseProfile(osl_TProfileImpl* pProfile) { - sal_Bool bRet=sal_False; - #ifdef TRACE_OSL_PROFILE OSL_TRACE("In releaseProfile\n"); #endif @@ -2204,11 +2206,11 @@ static sal_Bool releaseProfile(osl_TProfileImpl* pProfile) { if (pProfile->m_Flags & FLG_MODIFIED) { - bRet=storeProfile(pProfile, sal_False); + sal_Bool bRet=storeProfile(pProfile, sal_False); OSL_ASSERT(bRet); + (void)bRet; } - closeFileImpl(pProfile->m_pFile,pProfile->m_Flags); pProfile->m_pFile = NULL; } @@ -2219,3 +2221,5 @@ static sal_Bool releaseProfile(osl_TProfileImpl* pProfile) #endif return (sal_True); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |