Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
ebb4ac78
Kaydet (Commit)
ebb4ac78
authored
Mar 06, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1190347 check rename(3) return value
Change-Id: Iebd3b0e1b52a01e14e01c6db1ca158ada91e8613
üst
f52dbb2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
profile.cxx
sal/osl/unx/profile.cxx
+5
-11
No files found.
sal/osl/unx/profile.cxx
Dosyayı görüntüle @
ebb4ac78
...
...
@@ -130,7 +130,7 @@ static sal_Bool releaseProfile(osl_TProfileImpl* pProfile);
static
sal_Bool
writeProfileImpl
(
osl_TFile
*
pFile
);
static
osl_TFile
*
osl_openTmpProfileImpl
(
osl_TProfileImpl
*
);
static
sal_B
ool
osl_ProfileSwapProfileNames
(
osl_TProfileImpl
*
);
static
b
ool
osl_ProfileSwapProfileNames
(
osl_TProfileImpl
*
);
static
void
osl_ProfileGenerateExtension
(
const
sal_Char
*
pszFileName
,
const
sal_Char
*
pszExtension
,
sal_Char
*
pszTmpName
,
int
BufferMaxLen
);
static
oslProfile
SAL_CALL
osl_psz_openProfile
(
const
sal_Char
*
pszProfileName
,
oslProfileOption
Flags
);
...
...
@@ -2014,10 +2014,8 @@ static osl_TFile* osl_openTmpProfileImpl(osl_TProfileImpl* pProfile)
return
pFile
;
}
static
sal_B
ool
osl_ProfileSwapProfileNames
(
osl_TProfileImpl
*
pProfile
)
static
b
ool
osl_ProfileSwapProfileNames
(
osl_TProfileImpl
*
pProfile
)
{
sal_Bool
bRet
=
sal_False
;
sal_Char
pszBakFile
[
PATH_MAX
];
sal_Char
pszTmpFile
[
PATH_MAX
];
...
...
@@ -2030,13 +2028,9 @@ static sal_Bool osl_ProfileSwapProfileNames(osl_TProfileImpl* pProfile)
/* unlink bak */
unlink
(
pszBakFile
);
/* rename ini bak */
rename
(
pProfile
->
m_FileName
,
pszBakFile
);
/* rename tmp ini */
rename
(
pszTmpFile
,
pProfile
->
m_FileName
);
return
bRet
;
// Rename ini -> bak, then tmp -> ini:
return
rename
(
pProfile
->
m_FileName
,
pszBakFile
)
==
0
&&
rename
(
pszTmpFile
,
pProfile
->
m_FileName
)
==
0
;
}
static
void
osl_ProfileGenerateExtension
(
const
sal_Char
*
pszFileName
,
const
sal_Char
*
pszExtension
,
sal_Char
*
pszTmpName
,
int
BufferMaxLen
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment