mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-14 14:42:22 -04:00
Silence a scan-build warning in dns_rbt_addname()
Clang Static Analyzer is unable to grasp that when dns_rbt_addnode() returns ISC_R_EXISTS, it always sets the pointer passed to it via its 'nodep' parameter to a non-NULL value. Add an extra safety check in the conditional expression used in dns_rbt_addname() to silence that warning.
This commit is contained in:
parent
1f78f3a586
commit
9cf1f39b54
1 changed files with 1 additions and 1 deletions
|
|
@ -733,7 +733,7 @@ dns_rbt_addname(dns_rbt_t *rbt, const dns_name_t *name, void *data) {
|
|||
* there is data associated with a node.
|
||||
*/
|
||||
if (result == ISC_R_SUCCESS ||
|
||||
(result == ISC_R_EXISTS && node->data == NULL))
|
||||
(result == ISC_R_EXISTS && node != NULL && node->data == NULL))
|
||||
{
|
||||
node->data = data;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue