Coverity analysis defect 115212: Wrong operator used

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0, 4.4.2
    • Affects Version/s: None
    • Component/s: Catalog
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-08-24
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Wrong operator used

      Inadvertent use of the wrong operator results in a likely logic error. Common interchanges include bit-or and bit-and, left-shift and right-shift. Wrong operator used in expression
      /src/mongo/db/commands/dbcommands.cpp:356: CONSTANT_EXPRESSION_RESULT 115212 "opCtx->getClient()>session()>getTags() | 2U /* mongo::transport::Session::kInternalClient */" is always 1/true regardless of the values of its operand. This occurs as the logical second operand of "||".

              Assignee:
              Gregory Wlodarek
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: