On Sun, Jan 15, 2012 at 09:04:23AM -0800, julien2412 <serval2...@yahoo.fr> 
wrote:
> Cppcheck detects this :
> core/ucb/source/ucp/webdav/LockEntrySequence.cxx
> 174   duplicateExpression     style   Same expression on both sides of '||'.
> 
>         case STATE_LOCKENTRY:
>             if ( !pCtx->hasType || !pCtx->hasType ) <-- Here
>                 return 1; // abort
>             break;
> 
> First, I thought about just replacing the above line by this one : 
> if ( !pCtx->hasType || !pCtx->hasScope )
> 
> But I wonder if it should be "||" or "&&"

Hi Julien,

Given that it's the same expression (and it's not a method that could
have side-effects), it doesn't matter if it's || or &&, so I would go
ahead with your first thought.

Miklos

Attachment: pgpnEQl654ZUM.pgp
Description: PGP signature

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to