Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9167

Remove redundant ts test against 0

    • 1
    • Storage - Ra 2022-05-02

      Redundant test

      By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
      /src/txn/txn_timestamp.c:1021: DEADCODE 121976 At condition "ts != 0UL", the value of "ts" must be at least 1.
      /src/txn/txn_timestamp.c:1021: DEADCODE 121976 At condition "ts != 0UL", the value of "ts" cannot be equal to 0.
      /src/txn/txn_timestamp.c:985: DEADCODE 121976 Condition "ts == 0UL", taking false branch. Now the value of "ts" is at least 1.
      /src/txn/txn_timestamp.c:985: DEADCODE 121976 Condition "ts == 0UL", taking false branch. Now the value of "ts" cannot be equal to 0.
      /src/txn/txn_timestamp.c:1021: DEADCODE 121976 The condition "ts != 0UL" must be true.

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: