[Libreoffice-commits] .: sal/osl
Julien Nabet
serval2412 at kemper.freedesktop.org
Fri Jul 13 16:07:26 PDT 2012
sal/osl/unx/profile.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit c48c7560eed91616a33771deae9b4a4d1ccd77e8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jul 14 01:05:03 2012 +0200
Let's check struct var != NULL before initializing its attributes
Change-Id: I968292c1c64bcd3dd3d21dfd991c1a31edec8893
diff --git a/sal/osl/unx/profile.c b/sal/osl/unx/profile.c
index cfdb5ea..7736305 100644
--- a/sal/osl/unx/profile.c
+++ b/sal/osl/unx/profile.c
@@ -1876,19 +1876,20 @@ static sal_Bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile)
sal_Char* pLine;
sal_Char* bWasAdded = NULL;
- pProfile->m_NoLines = 0;
- pProfile->m_NoSections = 0;
- if ( pFile == 0 )
+ if ( !pFile )
{
return sal_False;
}
- if ( pProfile == 0 )
+ if ( !pProfile )
{
return sal_False;
}
+ pProfile->m_NoLines = 0;
+ pProfile->m_NoSections = 0;
+
OSL_VERIFY(OslProfile_rewindFile(pFile, sal_False));
while ( ( pLine=OslProfile_getLine(pFile) ) != 0 )
More information about the Libreoffice-commits
mailing list