diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 56682966d2..fa2cfae7ac 100644 --- a/lib/dns/qpcache.c +++ b/lib/dns/qpcache.c @@ -2667,14 +2667,11 @@ add(qpcache_t *qpdb, qpcnode_t *qpnode, dns_slabheader_t *newheader, * The NXDOMAIN/NODATA(QTYPE=ANY) * is more trusted. */ - if (addedrdataset != NULL) { - bindrdataset( - qpdb, qpnode, - top->header, now, - nlocktype, tlocktype, - addedrdataset - DNS__DB_FLARG_PASS); - } + bindrdataset( + qpdb, qpnode, top->header, now, + nlocktype, tlocktype, + addedrdataset + DNS__DB_FLARG_PASS); return DNS_R_UNCHANGED; } /* @@ -2725,11 +2722,9 @@ find_header: if (trust < header->trust && (ACTIVE(header, now) || !EXISTS(header))) { - if (addedrdataset != NULL) { - bindrdataset(qpdb, qpnode, header, now, - nlocktype, tlocktype, - addedrdataset DNS__DB_FLARG_PASS); - } + bindrdataset(qpdb, qpnode, header, now, nlocktype, + tlocktype, + addedrdataset DNS__DB_FLARG_PASS); return DNS_R_UNCHANGED; } @@ -2764,11 +2759,9 @@ find_header: header->closest = newheader->closest; newheader->closest = NULL; } - if (addedrdataset != NULL) { - bindrdataset(qpdb, qpnode, header, now, - nlocktype, tlocktype, - addedrdataset DNS__DB_FLARG_PASS); - } + bindrdataset(qpdb, qpnode, header, now, nlocktype, + tlocktype, + addedrdataset DNS__DB_FLARG_PASS); return DNS_R_UNCHANGED; } @@ -2816,11 +2809,9 @@ find_header: header->closest = newheader->closest; newheader->closest = NULL; } - if (addedrdataset != NULL) { - bindrdataset(qpdb, qpnode, header, now, - nlocktype, tlocktype, - addedrdataset DNS__DB_FLARG_PASS); - } + bindrdataset(qpdb, qpnode, header, now, nlocktype, + tlocktype, + addedrdataset DNS__DB_FLARG_PASS); return DNS_R_UNCHANGED; } @@ -2893,10 +2884,8 @@ find_header: } } - if (addedrdataset != NULL) { - bindrdataset(qpdb, qpnode, newheader, now, nlocktype, tlocktype, - addedrdataset DNS__DB_FLARG_PASS); - } + bindrdataset(qpdb, qpnode, newheader, now, nlocktype, tlocktype, + addedrdataset DNS__DB_FLARG_PASS); return ISC_R_SUCCESS; } diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 1db535ffbd..247434d3ac 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -2053,10 +2053,7 @@ add(qpzonedb_t *qpdb, qpznode_t *node, const dns_name_t *nodename, return DNS_R_CNAMEANDOTHER; } - if (addedrdataset != NULL) { - bindrdataset(qpdb, node, newheader, - addedrdataset DNS__DB_FLARG_PASS); - } + bindrdataset(qpdb, node, newheader, addedrdataset DNS__DB_FLARG_PASS); return ISC_R_SUCCESS; }