Strange line in sal/osl/unx/profile.c

julien2412 serval2412 at yahoo.fr
Fri Jul 13 16:01:23 PDT 2012


Hello,

Cppcheck reported this :
[sal/osl/unx/profile.c:1306] -> [sal/osl/unx/profile.c:1306]: (style) Same
expression on both sides of '|'
   1306         if ( Flags & (osl_Profile_WRITELOCK | osl_Profile_WRITELOCK
) )
   1307         {
   1308             OslProfile_lockFile(pFile, un_lock);
   1309         }

in comparison, there's on sal/osl/w32/profile.cxx this :
   1225     if ( ProfileFlags & (osl_Profile_WRITELOCK |
osl_Profile_READLOCK ) )
   1226     {
   1227 #ifdef DEBUG_OSL_PROFILE
   1228         OSL_TRACE("locking '%s' file",pszFilename);
   1229 #endif
   1230 
   1231         lockFile(pFile, bWriteable ? write_lock : read_lock);
   1232     }

Should the if part in profile.c simply replaced by :
  if ( Flags & (osl_Profile_WRITELOCK | osl_Profile_READLOCK ) )
or is it less obvious ?

Julien

--
View this message in context: http://nabble.documentfoundation.org/Strange-line-in-sal-osl-unx-profile-c-tp3995381.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list