Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-919

Coverity analysis defect 67272: Redundant test

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta0
    • Affects Version/s: None
    • Component/s: None
    • None

      Test always evaluates the same

      Defect 67272 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/mongoc/mongoc-async-cmd.c
      Function _mongoc_async_cmd_phase_send
      /src/mongoc/mongoc-async-cmd.c, line: 280
      Condition "bytes", taking false branch. Now the value of "bytes" is equal to 0.

             while (bytes) {
      

      /src/mongoc/mongoc-async-cmd.c, line: 273
      Condition "bytes < 0L", taking false branch. Now the value of "bytes" is at least 0.

             if (bytes < 0) {
      

      /src/mongoc/mongoc-async-cmd.c, line: 292
      At condition "bytes", the value of "bytes" must be equal to 0.

             if (!bytes) {
      

      /src/mongoc/mongoc-async-cmd.c, line: 288
      Assigning: "bytes" = "0L".

                   bytes = 0;
      

      /src/mongoc/mongoc-async-cmd.c, line: 292
      The condition "!bytes" must be true.

             if (!bytes) {
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: