[Libreoffice-commits] core.git: sal/osl

Michaël Lefèvre lefevre00 at yahoo.fr
Fri Mar 13 07:20:26 PDT 2015


 sal/osl/w32/profile.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 386a85ed50a3e4832644072950a30304ba6c58a6
Author: Michaël Lefèvre <lefevre00 at yahoo.fr>
Date:   Thu Mar 12 22:27:09 2015 +0100

    CppCheck cleaning : avoid static string comparison
    
    Change-Id: I6a7375901fcec63892041aec8cc2d55ce7789724
    Reviewed-on: https://gerrit.libreoffice.org/14848
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 27bc9d7..eb9b779 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -2150,8 +2150,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
 
             /* open sversion.ini in the users directory, and try to locate the entry
                with the highest version for StarOffice */
-            if ((strcmp(SVERSION_LOCATION, SVERSION_FALLBACK) != 0) &&
-                (osl_getProfileName(strSVLocation, strSVName, &strSVProfile)))
+            if ( osl_getProfileName(strSVLocation, strSVName, &strSVProfile) )
             {
                 hProfile = osl_openProfile(strSVProfile, osl_Profile_READLOCK);
                 if (hProfile)
@@ -2389,9 +2388,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
                         osl_closeProfile(hProfile);
 
                         /* if not found, try the fallback */
-                        if ((Buffer[0] == '\0')
-                            && (strcmp(SVERSION_LOCATION, SVERSION_FALLBACK)
-                                != 0))
+                        if (Buffer[0] == '\0')
                         {
                             if (osl_getProfileName(
                                     strSVFallback, strSVName, &strSVProfile))


More information about the Libreoffice-commits mailing list