]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix Coverity CID 487884: Dead code in qpcache.c
authorMatthijs Mekking <matthijs@isc.org>
Tue, 12 Mar 2024 13:12:23 +0000 (14:12 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 14 Mar 2024 10:42:30 +0000 (10:42 +0000)
commit659fa0cbc36b44ddebb0eeeadf90e8882bec68ce
tree6cc9c005673d198fc3d6de1fd13492caeff5d8eb
parent1102c5d552ccfc6f079e82e317474e94e871dbda
Fix Coverity CID 487884: Dead code in qpcache.c

Adding a changed record is zonedb related and does not belong in
the cache code. This is a leftover dead code and can be safely
removed.

/lib/dns/qpcache.c: 3459 in add()
3453      }
3454      newheader->next = topheader->next;
3455      newheader->down = topheader;
3456      topheader->next = newheader;
3457      qpnode->dirty = 1;
3458      if (changed != NULL) {
>>>     CID 487884:    (DEADCODE)
>>>     Execution cannot reach this statement: "changed->dirty = true;".
3459      changed->dirty = true;
3460      }
3461      } else {
3462      /*
3463       * No rdatasets of the given type exist at the node.
3464       */
/lib/dns/qpcache.c: 3409 in add()
3403      }
3404      newheader->next = topheader->next;
3405      newheader->down = topheader;
3406      topheader->next = newheader;
3407      qpnode->dirty = 1;
3408      if (changed != NULL) {
>>>     CID 487884:    (DEADCODE)
>>>     Execution cannot reach this statement: "changed->dirty = true;".
3409      changed->dirty = true;
3410      }
3411      mark_ancient(header);
3412      if (sigheader != NULL) {
3413      mark_ancient(sigheader);
3414
lib/dns/qpcache.c