Coverity Quality Issue 183871: Improper use of negative value

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Coverity found a Quality issue: Improper use of negative value

      Details:

      Coverity Issue ID: 183871
      Issue Description: Negative value can be returned from function is not being checked before being used improperly
      Potential Impact: The negative value may be unexpected by later operations, causing incorrect computations.
      Coverity checker: NEGATIVE_RETURNS
      Branch: v8.0
      File path: /src/mongo/db/repl/replication_coordinator_impl.cpp
      Line number: Unknown

      What Coverity Detected (Main Finding)

      "this->_selfIndex" is passed to a parameter that cannot be negative.

      The issue can be viewed in Coverity here.

      How do I fix this?

      Refer to https://wiki.corp.mongodb.com/spaces/HGTC/pages/385852267/Guidance+on+fixing+Coverity+issues for guidance on fixing Coverity issues.

      Note: This issue was found on the v8.0 branch. If a fix is needed, you must create a BACKPORT ticket following the Server BACKPORT policy

            Assignee:
            Unassigned
            Reporter:
            kondukto-svc@mongodb.com
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: