[Libreoffice] About "Same expression on both sides of '||'" in LockEntrySequence.cxx

julien2412 serval2412 at yahoo.fr
Sun Jan 15 09:04:23 PST 2012


Cppcheck detects this :
174	duplicateExpression	style	Same expression on both sides of '||'.

        case STATE_LOCKENTRY:
            if ( !pCtx->hasType || !pCtx->hasType ) <-- Here
                return 1; // abort

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 "&&"

Any idea ?


View this message in context: http://nabble.documentfoundation.org/About-Same-expression-on-both-sides-of-in-LockEntrySequence-cxx-tp3661021p3661021.html
Sent from the Dev mailing list archive at Nabble.com.

More information about the LibreOffice mailing list