]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
authorOndřej Surý <ondrej@sury.org>
Tue, 10 Sep 2019 12:42:41 +0000 (14:42 +0200)
committerMark Andrews <marka@isc.org>
Fri, 4 Oct 2019 04:08:26 +0000 (14:08 +1000)
Use the semantic patch from the previous commit to replace all the calls to
dns_name_copy() with NULL as third argument with dns_name_copynf().

(cherry picked from commit c2dad0dcb2523a7711380e4409144745231b5282)

34 files changed:
bin/dig/dighost.c
bin/dig/host.c
bin/dig/nslookup.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-signzone.c
bin/named/zoneconf.c
bin/nsupdate/nsupdate.c
bin/tests/system/dyndb/driver/syncptr.c
lib/dns/adb.c
lib/dns/client.c
lib/dns/dnsrps.c
lib/dns/include/dns/name.h
lib/dns/journal.c
lib/dns/lookup.c
lib/dns/masterdump.c
lib/dns/nsec3.c
lib/dns/nta.c
lib/dns/order.c
lib/dns/rbt.c
lib/dns/rbtdb.c
lib/dns/rdataset.c
lib/dns/resolver.c
lib/dns/rrl.c
lib/dns/sdb.c
lib/dns/sdlz.c
lib/dns/tkey.c
lib/dns/validator.c
lib/dns/view.c
lib/dns/zone.c
lib/dns/zoneverify.c
lib/ns/query.c
lib/ns/update.c
lib/samples/nsprobe.c

index 0311496e5212dab01bd92d78a42944d90b3806f9..8904611b45ba58a6086c0066d29be7651fa4cb55 100644 (file)
@@ -810,7 +810,8 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
                memmove(looknew->ecs_addr, lookold->ecs_addr, len);
        }
 
-       RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&lookold->fdomain), dns_fixedname_name(&looknew->fdomain), NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(dns_fixedname_name(&lookold->fdomain),
+                          dns_fixedname_name(&looknew->fdomain));
 
        if (servers)
                clone_server_list(lookold->my_server_list,
@@ -1823,7 +1824,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
                                if (lookup->ns_search_only)
                                        lookup->recurse = false;
                                domain = dns_fixedname_name(&lookup->fdomain);
-                               RUNTIME_CHECK(dns_name_copy(name, domain, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(name, domain);
                        }
                        debug("adding server %s", namestr);
                        num = getaddresses(lookup, namestr, &lresult);
index 5770ef30373aa9047b08cc47a143bfc9ed1012b4..6e3967d79ac2fa160bcd5b37ced291565a49f2c1 100644 (file)
@@ -396,7 +396,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
                dns_rdataset_current(rdataset, &rdata);
                result = dns_rdata_tostruct(&rdata, &cname, NULL);
                check_result(result, "dns_rdata_tostruct");
-               RUNTIME_CHECK(dns_name_copy(&cname.cname, qname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(&cname.cname, qname);
                dns_rdata_freestruct(&cname);
        }
 }
@@ -455,7 +455,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
 
                /* Add AAAA and MX lookups. */
                name = dns_fixedname_initname(&fixed);
-               RUNTIME_CHECK(dns_name_copy(query->lookup->name, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(query->lookup->name, name);
                chase_cnamechain(msg, name);
                dns_name_format(name, namestr, sizeof(namestr));
                lookup = clone_lookup(query->lookup, false);
index e0240b2ef056eb744c6ab2941cce881cfe50e900..df2a8bc98cc7f2c4cd18b6c9e279fbef477ac9de 100644 (file)
@@ -425,7 +425,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
                dns_rdataset_current(rdataset, &rdata);
                result = dns_rdata_tostruct(&rdata, &cname, NULL);
                check_result(result, "dns_rdata_tostruct");
-               RUNTIME_CHECK(dns_name_copy(&cname.cname, qname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(&cname.cname, qname);
                dns_rdata_freestruct(&cname);
        }
 }
@@ -478,7 +478,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
 
                /* Add AAAA lookup. */
                name = dns_fixedname_initname(&fixed);
-               RUNTIME_CHECK(dns_name_copy(query->lookup->name, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(query->lookup->name, name);
                chase_cnamechain(msg, name);
                dns_name_format(name, namestr, sizeof(namestr));
                lookup = clone_lookup(query->lookup, false);
index 9f38ebd2eb117b476613651e6bd5ca6a269df574..dc439ecc84402b2a2ce87c5c0c8e34a45de90a2b 100644 (file)
@@ -207,7 +207,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
        rdclass = dst_key_class(key);
 
        name = dns_fixedname_initname(&fixed);
-       RUNTIME_CHECK(dns_name_copy(dst_key_name(key), name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(dst_key_name(key), name);
 
        dst_key_free(&key);
 }
index 490d42c2f3b5b9d3d0f8d4f11c005ee2a9bc10fe..67f4137c27d2ecec0d8c43999d3f9441d1498f5b 100644 (file)
@@ -181,7 +181,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
        rdclass = dst_key_class(key);
 
        name = dns_fixedname_initname(&fixed);
-       RUNTIME_CHECK(dns_name_copy(dst_key_name(key), name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(dst_key_name(key), name);
 
        dst_key_free(&key);
 }
index 45e589d2875cbca9993ffdba5f55382a5ee73598..88b910227da8bb8975291db8b774494bf75ca5d0 100644 (file)
@@ -204,7 +204,7 @@ savezonecut(dns_fixedname_t *fzonecut, dns_name_t *name) {
        dns_name_t *result;
 
        result = dns_fixedname_initname(fzonecut);
-       RUNTIME_CHECK(dns_name_copy(name, result, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, result);
 
        return (result);
 }
@@ -2346,7 +2346,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                        break;
                }
                if (result == ISC_R_NOMORE) {
-                       RUNTIME_CHECK(dns_name_copy(gorigin, nextname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(gorigin, nextname);
                        done = true;
                } else if (result != ISC_R_SUCCESS)
                        fatal("iterating through the database failed: %s",
@@ -2480,7 +2480,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
                        break;
                }
                if (result == ISC_R_NOMORE) {
-                       RUNTIME_CHECK(dns_name_copy(gorigin, nextname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(gorigin, nextname);
                        done = true;
                } else if (result != ISC_R_SUCCESS)
                        fatal("iterating through the database failed: %s",
index 5406e284613d57feb9c5ce6fe690b9bc076ed0de..bc39d1ca3d503b068949461629e6c063bec2fb8e 100644 (file)
@@ -260,7 +260,8 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
 
                dns_fixedname_init(&fname);
                if (usezone) {
-                       RUNTIME_CHECK(dns_name_copy(dns_zone_getorigin(zone), dns_fixedname_name(&fname), NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(dns_zone_getorigin(zone),
+                                          dns_fixedname_name(&fname));
                } else {
                        str = cfg_obj_asstring(dname);
                        isc_buffer_constinit(&b, str, strlen(str));
index 95d9f59a1637e3a83ddfa279d2ee1c5e37c1d035..a81c48a52c9b411d2ca32d2b680b7f50b2f01c72 100644 (file)
@@ -2636,7 +2636,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
                 * address.
                 */
                zname = dns_fixedname_initname(&fzname);
-               RUNTIME_CHECK(dns_name_copy(name, zname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name, zname);
        }
 
        if (debugging) {
index 166c8dba7e19bba376654a48f72d4fe0ab08a668..cfc548d2dcc2f4d002ed8131a5af1d8b2944a453 100644 (file)
@@ -235,7 +235,7 @@ syncptr(sample_instance_t *inst, dns_name_t *name,
        /* Reverse zone is managed by this driver, prepare PTR record */
        pevent->zone = NULL;
        dns_zone_attach(ptr_zone, &pevent->zone);
-       RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&pevent->ptr_target_name), NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, dns_fixedname_name(&pevent->ptr_target_name));
        dns_name_clone(dns_fixedname_name(&pevent->ptr_target_name),
                       &ptr_struct.ptr);
        dns_diff_init(inst->mctx, &pevent->diff);
index 6cf1283a45445685ddd45b307b702c9d72eef852..3b68e4334130422d82a69928e6ea0107954608b2 100644 (file)
@@ -3207,7 +3207,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
        find->partial_result |= (adbname->partial_result & wanted_addresses);
        if (alias) {
                if (target != NULL) {
-                       RUNTIME_CHECK(dns_name_copy(&adbname->target, target, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(&adbname->target, target);
                }
                result = DNS_R_ALIAS;
        } else
index a47d8d827456c8643b313d5566e06aa479fc79de..172786b15daa8280fa1eb27e2a2d8be670350a1f 100644 (file)
@@ -984,8 +984,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
                        dns_rdata_reset(&rdata);
                        if (tresult != ISC_R_SUCCESS)
                                goto done;
-                       RUNTIME_CHECK(dns_name_copy(&cname.cname, name, NULL)
-                                     == ISC_R_SUCCESS);
+                       dns_name_copynf(&cname.cname, name);
                        dns_rdata_freestruct(&cname);
                        want_restart = true;
                        goto done;
@@ -1417,7 +1416,7 @@ dns_client_startresolve(dns_client_t *client, const dns_name_t *name,
        rctx->sigrdataset = sigrdataset;
 
        dns_fixedname_init(&rctx->name);
-       RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&rctx->name), NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, dns_fixedname_name(&rctx->name));
 
        rctx->client = client;
        ISC_LINK_INIT(rctx, link);
@@ -2231,7 +2230,7 @@ process_soa(updatectx_t *uctx, dns_rdataset_t *soaset,
 
        if (uctx->zonename == NULL) {
                uctx->zonename = dns_fixedname_name(&uctx->zonefname);
-               RUNTIME_CHECK(dns_name_copy(soaname, uctx->zonename, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(soaname, uctx->zonename);
        }
 
        if (uctx->currentserver != NULL)
@@ -2607,7 +2606,7 @@ copy_name(isc_mem_t *mctx, dns_message_t *msg, const dns_name_t *name,
        dns_name_init(newname, NULL);
        dns_name_setbuffer(newname, namebuf);
        dns_message_takebuffer(msg, &namebuf);
-       RUNTIME_CHECK(dns_name_copy(name, newname, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, newname);
 
        for (rdataset = ISC_LIST_HEAD(name->list); rdataset != NULL;
             rdataset = ISC_LIST_NEXT(rdataset, link)) {
@@ -2906,8 +2905,7 @@ dns_client_startupdate(dns_client_t *client, dns_rdataclass_t rdclass,
                goto fail;
        if (zonename != NULL) {
                uctx->zonename = dns_fixedname_name(&uctx->zonefname);
-               RUNTIME_CHECK(dns_name_copy(zonename, uctx->zonename, NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(zonename, uctx->zonename);
        }
        if (servers != NULL) {
                for (server = ISC_LIST_HEAD(*servers);
index e3fa5ee953def6e5dab81c5cb0fd2b354724c06f..78bf6e74d8bef90893c37d43d19733a9acb32125 100644 (file)
@@ -606,7 +606,7 @@ rpsdb_finddb(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
                nodep = &node;
        }
        rpsdb_findnode(db, name, false, nodep);
-       RUNTIME_CHECK(dns_name_copy(name, foundname, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, foundname);
        return (rpsdb_findrdataset(db, *nodep, NULL, type, 0, 0,
                                    rdataset, sigrdataset));
 }
index f25ecd5d9ba169d72d58f05d405fa3ab5709b19d..b64092d44577a1ec974d054321f22de9c72dd76d 100644 (file)
@@ -1244,7 +1244,7 @@ void
 dns_name_copynf(const dns_name_t *source, dns_name_t *dest);
 /*%<
  * Makes 'dest' refer to a copy of the name in 'source'.  The data are either
- * copied to 'target' or in case of dns_name_copyfixed the dedicated buffer in
+ * copied to 'target' or in case of dns_name_copynf the dedicated buffer in
  * 'dest'.
  *
  * Requires:
index fd679704cbb3897e0766265bf1cd7e9ab5ea46bf..4fd2a36b3db0c2ce397503ab669ba2ae88935e7d 100644 (file)
@@ -132,7 +132,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
        dns_name_t *zonename;
 
        zonename = dns_fixedname_initname(&fixed);
-       RUNTIME_CHECK(dns_name_copy(dns_db_origin(db), zonename, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(dns_db_origin(db), zonename);
 
        node = NULL;
        result = dns_db_findnode(db, zonename, false, &node);
index 4e9d7f3fccb8b9cde5af16694011754798e54604..406481bb26a689e6d294754505da901d9fcd07ae 100644 (file)
@@ -271,7 +271,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
                        dns_rdata_reset(&rdata);
                        if (result != ISC_R_SUCCESS)
                                break;
-                       RUNTIME_CHECK(dns_name_copy(&cname.cname, name, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(&cname.cname, name);
                        dns_rdata_freestruct(&cname);
                        want_restart = true;
                        send_event = false;
@@ -412,7 +412,7 @@ dns_lookup_create(isc_mem_t *mctx, const dns_name_t *name, dns_rdatatype_t type,
 
        dns_fixedname_init(&lookup->name);
 
-       RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&lookup->name), NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, dns_fixedname_name(&lookup->name));
 
        lookup->type = type;
        lookup->view = NULL;
index 1faab950ec564fc80f4a3a1066a23033d3cc872b..d23c1c1dcbbb83a55d20c141d63d25c8d53769ee 100644 (file)
@@ -502,7 +502,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
 
        if (owner_name != NULL) {
                name = dns_fixedname_initname(&fixed);
-               RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(owner_name, name);
                dns_rdataset_getownercase(rdataset, name);
        }
 
@@ -1203,7 +1203,7 @@ dump_rdatasets_raw(isc_mem_t *mctx, const dns_name_t *owner_name,
        dns_name_t *name;
 
        name = dns_fixedname_initname(&fixed);
-       RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(owner_name, name);
        for (result = dns_rdatasetiter_first(rdsiter);
             result == ISC_R_SUCCESS;
             result = dns_rdatasetiter_next(rdsiter)) {
index fd10a20c8b182af0b866df93cc62edf0b6f08468..921382c141509b41aabd6ab32a7fafc1dbeb8872 100644 (file)
@@ -1929,7 +1929,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
         */
        if (dns_name_countlabels(zonename) == 0 ||
            dns_name_issubdomain(zone, zonename))
-               RUNTIME_CHECK(dns_name_copy(zone, zonename, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(zone, zonename);
 
        if (!dns_name_equal(zone, zonename))
                return (ISC_R_IGNORE);
@@ -2072,7 +2072,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
                                (*logit)(arg, ISC_LOG_DEBUG(3),
                                         "NSEC3 indicates potential closest "
                                         "encloser: '%s'", namebuf);
-                               RUNTIME_CHECK(dns_name_copy(qname, closest, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(qname, closest);
                                *setclosest = true;
                        }
                        dns_name_format(qname, namebuf, sizeof(namebuf));
@@ -2103,7 +2103,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
                        if (nearest != NULL &&
                            (dns_name_countlabels(nearest) == 0 ||
                             dns_name_issubdomain(nearest, qname))) {
-                               RUNTIME_CHECK(dns_name_copy(qname, nearest, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(qname, nearest);
                                *setnearest = true;
                        }
 
index 2611b11a69eea2f7730779da512e376d64919287..0f372c6d055692011ca738910bd27f29fb0dbfb7 100644 (file)
@@ -329,7 +329,7 @@ nta_create(dns_ntatable_t *ntatable, const dns_name_t *name,
        isc_refcount_init(&nta->refcount, 1);
 
        nta->name = dns_fixedname_initname(&nta->fn);
-       RUNTIME_CHECK(dns_name_copy(name, nta->name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(name, nta->name);
 
        nta->magic = NTA_MAGIC;
 
index f8918f9dc26f9fc6214d2736114652559a329ada..730a6a469c1ad8f2011b547c07d2e08eb50fe82b 100644 (file)
@@ -85,8 +85,7 @@ dns_order_add(dns_order_t *order, const dns_name_t *name,
                return (ISC_R_NOMEMORY);
 
        dns_fixedname_init(&ent->name);
-       RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&ent->name), NULL)
-                     == ISC_R_SUCCESS);
+       dns_name_copynf(name, dns_fixedname_name(&ent->name));
        ent->rdtype = rdtype;
        ent->rdclass = rdclass;
        ent->mode = mode;
index 5f87cceaf97ad450a83b9a5c0ff51f6539757599..a67d8f96bbd5156308159dbaf689442248faff19 100644 (file)
@@ -1047,7 +1047,7 @@ chain_name(dns_rbtnodechain_t *chain, dns_name_t *name,
 
        if (include_chain_end && chain->end != NULL) {
                NODENAME(chain->end, &nodename);
-               RUNTIME_CHECK(dns_name_copy(&nodename, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(&nodename, name);
        } else
                dns_name_reset(name);
 
@@ -3212,8 +3212,7 @@ dns_rbtnodechain_current(dns_rbtnodechain_t *chain, dns_name_t *name,
                if (chain->level_count > 0) {
                        result = chain_name(chain, origin, false);
                } else {
-                       RUNTIME_CHECK(dns_name_copy(dns_rootname, origin, NULL)
-                                     == ISC_R_SUCCESS);
+                       dns_name_copynf(dns_rootname, origin);
                }
        }
 
index 48eede69959904dda59dbd87cb828ab9ab4c1294..c012a654f0e2d620edb50f946180d9750d2bf307 100644 (file)
@@ -2957,8 +2957,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
                         * is, we need to remember the node name.
                         */
                        zcname = dns_fixedname_name(&search->zonecut_name);
-                       RUNTIME_CHECK(dns_name_copy(name, zcname, NULL) ==
-                                     ISC_R_SUCCESS);
+                       dns_name_copynf(name, zcname);
                        search->copy_name = true;
                }
        } else {
@@ -3082,7 +3081,7 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
         */
        if (foundname != NULL && search->copy_name) {
                zcname = dns_fixedname_name(&search->zonecut_name);
-               RUNTIME_CHECK(dns_name_copy(zcname, foundname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(zcname, foundname);
        }
        if (nodep != NULL) {
                /*
@@ -3910,7 +3909,7 @@ zone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
                         */
                        result = find_wildcard(&search, &node, name);
                        if (result == ISC_R_SUCCESS) {
-                               RUNTIME_CHECK(dns_name_copy(name, foundname, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(name, foundname);
                                wild = true;
                                goto found;
                        }
@@ -4559,9 +4558,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
                        if (foundname != NULL) {
                                dns_name_init(&name, NULL);
                                dns_rbt_namefromnode(node, &name);
-                               RUNTIME_CHECK(dns_name_copy(&name, foundname,
-                                                           NULL)
-                                             == ISC_R_SUCCESS);
+                               dns_name_copynf(&name, foundname);
                                while (i > 0) {
                                        i--;
                                        level_node = search->chain.levels[i];
@@ -5118,7 +5115,7 @@ cache_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options,
        } else if (result != ISC_R_SUCCESS) {
                goto tree_exit;
        } else if (!dcnull) {
-               RUNTIME_CHECK(dns_name_copy(dcname, foundname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(dcname, foundname);
        }
        /*
         * We now go looking for an NS rdataset at the node.
@@ -9380,7 +9377,7 @@ dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
        if (rbtdbiter->result != ISC_R_SUCCESS)
                return (rbtdbiter->result);
 
-       RUNTIME_CHECK(dns_name_copy(origin, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(origin, name);
        return (ISC_R_SUCCESS);
 }
 
@@ -9756,7 +9753,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype) {
                }
 
                gluename = dns_fixedname_initname(&glue->fixedname);
-               RUNTIME_CHECK(dns_name_copy(name_a, gluename, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name_a, gluename);
 
                dns_rdataset_init(&glue->rdataset_a);
                dns_rdataset_init(&glue->sigrdataset_a);
@@ -9784,7 +9781,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype) {
                        }
 
                        gluename = dns_fixedname_initname(&glue->fixedname);
-                       RUNTIME_CHECK(dns_name_copy(name_aaaa, gluename, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name_aaaa, gluename);
 
                        dns_rdataset_init(&glue->rdataset_a);
                        dns_rdataset_init(&glue->sigrdataset_a);
index 48110ae4fa232df8ca66e329929c929705c6db75..d129d3c14be1cbec9ffca905310953513ca8d041 100644 (file)
@@ -456,7 +456,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        added = 0;
 
        name = dns_fixedname_initname(&fixed);
-       RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(owner_name, name);
        dns_rdataset_getownercase(rdataset, name);
        offset = 0xffff;
 
index f4865bcda402910bf91231dd97c98ee81ad6ccd8..543788d2b98b5c9651a89e57b8e90108594f12c1 100644 (file)
@@ -1520,7 +1520,7 @@ fcount_incr(fetchctx_t *fctx, bool force) {
                        counter->allowed = 1;
                        counter->dropped = 0;
                        counter->domain = dns_fixedname_initname(&counter->fdname);
-                       RUNTIME_CHECK(dns_name_copy(&fctx->domain, counter->domain, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(&fctx->domain, counter->domain);
                        ISC_LIST_APPEND(dbucket->list, counter, link);
                }
        } else {
@@ -5264,8 +5264,7 @@ clone_results(fetchctx_t *fctx) {
             event != NULL;
             event = ISC_LIST_NEXT(event, ev_link)) {
                name = dns_fixedname_name(&event->foundname);
-               RUNTIME_CHECK(dns_name_copy(hname, name, NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(hname, name);
                event->result = hevent->result;
                dns_db_attach(hevent->db, &event->db);
                dns_db_attachnode(hevent->db, hevent->node, &event->node);
@@ -5392,7 +5391,8 @@ validated(isc_task_t *task, isc_event_t *event) {
         */
        if (vevent->proofs[DNS_VALIDATOR_NOQNAMEPROOF] != NULL) {
                wild = dns_fixedname_initname(&fwild);
-               RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&vevent->validator->wild), wild, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(dns_fixedname_name(&vevent->validator->wild),
+                                  wild);
        }
        dns_validator_destroy(&vevent->validator);
        isc_mem_put(fctx->mctx, valarg, sizeof(*valarg));
@@ -5762,9 +5762,8 @@ validated(isc_task_t *task, isc_event_t *event) {
                               eresult == DNS_R_NCACHENXRRSET);
                }
                hevent->result = eresult;
-               RUNTIME_CHECK(dns_name_copy(vevent->name,
-                             dns_fixedname_name(&hevent->foundname), NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(vevent->name,
+                                  dns_fixedname_name(&hevent->foundname));
                dns_db_attach(fctx->cache, &hevent->db);
                dns_db_transfernode(fctx->cache, &node, &hevent->node);
                clone_results(fctx);
@@ -5991,7 +5990,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
                if (event != NULL) {
                        adbp = &event->db;
                        aname = dns_fixedname_name(&event->foundname);
-                       RUNTIME_CHECK(dns_name_copy(name, aname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, aname);
                        anodep = &event->node;
                        /*
                         * If this is an ANY, SIG or RRSIG query, we're not
@@ -6624,7 +6623,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
                if (event != NULL) {
                        adbp = &event->db;
                        aname = dns_fixedname_name(&event->foundname);
-                       RUNTIME_CHECK(dns_name_copy(name, aname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, aname);
                        anodep = &event->node;
                        ardataset = event->rdataset;
                }
@@ -7140,7 +7139,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
                 * Retrieve state from fctx->nsfetch before we destroy it.
                 */
                domain = dns_fixedname_initname(&fixed);
-               RUNTIME_CHECK(dns_name_copy(&fctx->nsfetch->private->domain, domain, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(&fctx->nsfetch->private->domain, domain);
                if (dns_name_equal(&fctx->nsname, domain)) {
                        if (dns_rdataset_isassociated(fevent->rdataset)) {
                                dns_rdataset_disassociate(fevent->rdataset);
index a6b353376a27adea19435a7a9de1aaae09303daf..247401c9f7ae45d4e5b2395d5cfb856f710d00d9 100644 (file)
@@ -910,7 +910,8 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
                                e->log_qname = qbuf->index;
                                qbuf->e = e;
                                dns_fixedname_init(&qbuf->qname);
-                               RUNTIME_CHECK(dns_name_copy(qname, dns_fixedname_name(&qbuf->qname), NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(qname,
+                                                  dns_fixedname_name(&qbuf->qname));
                        }
                }
                if (qbuf != NULL)
index bfcb39624347338b2bb48a852655f3547db1f325..bbdc2c1320a4eef9a280e4a6b06f81c28c4c4a60 100644 (file)
@@ -1031,7 +1031,7 @@ findext(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
                dns_rdataset_disassociate(rdataset);
 
        if (foundname != NULL) {
-               RUNTIME_CHECK(dns_name_copy(xname, foundname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(xname, foundname);
        }
 
        if (nodep != NULL)
@@ -1594,7 +1594,7 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
 
        attachnode(iterator->db, sdbiter->current, nodep);
        if (name != NULL) {
-               RUNTIME_CHECK(dns_name_copy(sdbiter->current->name, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(sdbiter->current->name, name);
                return (ISC_R_SUCCESS);
        }
        return (ISC_R_SUCCESS);
@@ -1609,7 +1609,7 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
 static isc_result_t
 dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
        UNUSED(iterator);
-       RUNTIME_CHECK(dns_name_copy(dns_rootname, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(dns_rootname, name);
        return (ISC_R_SUCCESS);
 }
 
index ae34414307a20f3acb25aa38c8e84aabf75c8653..5c884181cd0309f0a5e139609910b9bd0776d15a 100644 (file)
@@ -1033,7 +1033,7 @@ findext(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
                dns_rdataset_disassociate(rdataset);
 
        if (foundname != NULL) {
-               RUNTIME_CHECK(dns_name_copy(xname, foundname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(xname, foundname);
        }
 
        if (nodep != NULL)
@@ -1416,7 +1416,7 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
 
        attachnode(iterator->db, sdlziter->current, nodep);
        if (name != NULL) {
-               RUNTIME_CHECK(dns_name_copy(sdlziter->current->name, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(sdlziter->current->name, name);
                return (ISC_R_SUCCESS);
        }
        return (ISC_R_SUCCESS);
@@ -1431,7 +1431,7 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
 static isc_result_t
 dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
        UNUSED(iterator);
-       RUNTIME_CHECK(dns_name_copy(dns_rootname, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(dns_rootname, name);
        return (ISC_R_SUCCESS);
 }
 
index 437d7dedce0b2f93d5956895d5cf423345cee9e6..b14ae728362e847fb753a92818fdb7026cad0fa2 100644 (file)
@@ -815,8 +815,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
 
                if (!dns_name_equal(qname, dns_rootname)) {
                        unsigned int n = dns_name_countlabels(qname);
-                       RUNTIME_CHECK(dns_name_copy(qname, keyname, NULL)
-                                     == ISC_R_SUCCESS);
+                       dns_name_copynf(qname, keyname);
                        dns_name_getlabelsequence(keyname, 0, n - 1, keyname);
                } else {
                        static char hexdigits[16] = {
@@ -1513,7 +1512,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
                dns_fixedname_t fixed;
 
                dns_fixedname_init(&fixed);
-               RUNTIME_CHECK(dns_name_copy(tkeyname, dns_fixedname_name(&fixed), NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(tkeyname, dns_fixedname_name(&fixed));
                tkeyname = dns_fixedname_name(&fixed);
 
                tkey.common.rdclass = dns_rdataclass_any;
index 31126dab05788a574f62c59a6e641b87711e4737..c8c6b2c035886f9c567dd3df50ea60983bc6edf7 100644 (file)
@@ -1543,7 +1543,7 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
                         * for the NSEC3 NOQNAME proof.
                         */
                        closest = dns_fixedname_name(&val->closest);
-                       RUNTIME_CHECK(dns_name_copy(wild, closest, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(wild, closest);
                        labels = dns_name_countlabels(closest) - 1;
                        dns_name_getlabelsequence(closest, 1, labels, closest);
                        val->attributes |= VALATTR_NEEDNOQNAME;
@@ -2544,7 +2544,7 @@ findnsec3proofs(dns_validator_t *val) {
                                 namebuf, sizeof(namebuf));
                validator_log(val, ISC_LOG_DEBUG(3), "closest encloser from "
                              "wildcard signature '%s'", namebuf);
-               RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&val->closest), closest, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(dns_fixedname_name(&val->closest), closest);
                closestp = NULL;
                setclosestp = NULL;
        } else {
@@ -3147,7 +3147,7 @@ finddlvsep(dns_validator_t *val, bool resume) {
                }
 
                dlvsep = dns_fixedname_initname(&val->dlvsep);
-               RUNTIME_CHECK(dns_name_copy(val->event->name, dlvsep, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(val->event->name, dlvsep);
                /*
                 * If this is a response to a DS query, we need to look in
                 * the parent zone for the trust anchor.
@@ -3198,7 +3198,7 @@ finddlvsep(dns_validator_t *val, bool resume) {
                            dns_rdataset_isassociated(&val->fsigrdataset))
                        {
                                dns_fixedname_init(&val->fname);
-                               RUNTIME_CHECK(dns_name_copy(dlvname, dns_fixedname_name(&val->fname), NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(dlvname, dns_fixedname_name(&val->fname));
                                result = create_validator(val,
                                                dns_fixedname_name(&val->fname),
                                                          dns_rdatatype_dlv,
@@ -3279,15 +3279,14 @@ proveunsecure(dns_validator_t *val, bool have_ds, bool resume)
        secroot = dns_fixedname_initname(&fixedsecroot);
        found = dns_fixedname_initname(&fixedfound);
        if (val->havedlvsep) {
-               RUNTIME_CHECK(dns_name_copy(val->event->name, secroot, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(val->event->name, secroot);
        } else {
                unsigned int labels;
-               dns_name_copy(val->event->name, secroot, NULL);
+               dns_name_copynf(val->event->name, secroot);
                /*
                 * If this is a response to a DS query, we need to look in
                 * the parent zone for the trust anchor.
                 */
-
                labels = dns_name_countlabels(secroot);
                if (val->event->type == dns_rdatatype_ds && labels > 1U)
                        dns_name_getlabelsequence(secroot, 1, labels - 1,
@@ -3361,7 +3360,7 @@ proveunsecure(dns_validator_t *val, bool have_ds, bool resume)
 
                tname = dns_fixedname_initname(&val->fname);
                if (val->labels == dns_name_countlabels(val->event->name))
-                       RUNTIME_CHECK(dns_name_copy(val->event->name, tname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(val->event->name, tname);
                else
                        dns_name_split(val->event->name, val->labels,
                                       NULL, tname);
index 2868296487f81f1bce0b5245fee53f3a21bdea2d..8a171e76c18fbd934b0f1cda33a93fffc039c3e7 100644 (file)
@@ -1318,7 +1318,7 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
                         * We found an answer, but the cache may be better.
                         */
                        zfname = dns_fixedname_name(&zfixedname);
-                       RUNTIME_CHECK(dns_name_copy(fname, zfname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(fname, zfname);
                        dns_rdataset_clone(rdataset, &zrdataset);
                        dns_rdataset_disassociate(rdataset);
                        if (sigrdataset != NULL &&
@@ -1376,9 +1376,9 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
                            dns_rdataset_isassociated(sigrdataset))
                                dns_rdataset_disassociate(sigrdataset);
                }
-               RUNTIME_CHECK(dns_name_copy(zfname, fname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(zfname, fname);
                if (dcname != NULL) {
-                       RUNTIME_CHECK(dns_name_copy(zfname, dcname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(zfname, dcname);
                }
                dns_rdataset_clone(&zrdataset, rdataset);
                if (sigrdataset != NULL &&
@@ -1400,7 +1400,7 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
                                dns_rdataset_disassociate(rdataset);
                        result = ISC_R_NOTFOUND;
                } else if (dcname != NULL) {
-                       RUNTIME_CHECK(dns_name_copy(fname, dcname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(fname, dcname);
                }
        }
 
@@ -2197,7 +2197,7 @@ dns_view_searchdlz(dns_view_t *view, const dns_name_t *name,
                 */
                for (i = namelabels; i > minlabels && i > 1; i--) {
                        if (i == namelabels) {
-                               RUNTIME_CHECK(dns_name_copy(name, zonename, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(name, zonename);
                        } else
                                dns_name_split(name, i, NULL, zonename);
 
index 03bc83e1fa28ab8a72a08ddfa113e03aefae05d6..d480db893227d88c29f0ad8d1bbc81b471627066 100644 (file)
@@ -3110,7 +3110,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
                /*
                 * Remember bottom of zone due to NS.
                 */
-               RUNTIME_CHECK(dns_name_copy(name, bottom, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name, bottom);
 
                result = dns_rdataset_first(&rdataset);
                while (result == ISC_R_SUCCESS) {
@@ -3133,7 +3133,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
                        /*
                         * Remember bottom of zone due to DNAME.
                         */
-                       RUNTIME_CHECK(dns_name_copy(name, bottom, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, bottom);
                        dns_rdataset_disassociate(&rdataset);
                }
 
@@ -7921,7 +7921,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                 * Remember the obscuring name so that
                                 * we skip all obscured names.
                                 */
-                               RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(found, name);
                                delegation = true;
                                goto next_addnode;
                        }
@@ -8184,7 +8184,7 @@ zone_nsec3chain(dns_zone_t *zone) {
                                 * Remember the obscuring name so that
                                 * we skip all obscured names.
                                 */
-                               RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(found, name);
                                delegation = true;
                                goto next_removenode;
                        }
@@ -8906,7 +8906,7 @@ zone_sign(dns_zone_t *zone) {
                                 * Remember the obscuring name so that
                                 * we skip all obscured names.
                                 */
-                               RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(found, name);
                                is_bottom_of_zone = true;
                                goto next_node;
                        }
index 6aba5546d6860ef0dd2e6d5e09de8c964058890c..adec567061adf5db5ea3011ed7869c068543e8b6 100644 (file)
@@ -1799,11 +1799,11 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) {
                }
                if (is_delegation(vctx, name, node, NULL)) {
                        zonecut = dns_fixedname_name(&fzonecut);
-                       RUNTIME_CHECK(dns_name_copy(name, zonecut, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, zonecut);
                        isdelegation = true;
                } else if (has_dname(vctx, node)) {
                        zonecut = dns_fixedname_name(&fzonecut);
-                       RUNTIME_CHECK(dns_name_copy(name, zonecut, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, zonecut);
                }
                nextnode = NULL;
                result = dns_dbiterator_next(dbiter);
@@ -1884,7 +1884,7 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) {
                } else {
                        prevname = dns_fixedname_name(&fprevname);
                }
-               RUNTIME_CHECK(dns_name_copy(name, prevname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name, prevname);
                if (*vresult == ISC_R_SUCCESS) {
                        *vresult = tvresult;
                }
index 42d5242aef0c468e5ad3b074ea4d0081b49d5d05..0d29a80a188e967c85909568b3fc1b0657ebd911 100644 (file)
@@ -2839,7 +2839,7 @@ rpz_rrset_find(ns_client_t *client, dns_name_t *name, dns_rdatatype_t type,
                        query_rpzfetch(client, name, type);
                        result = DNS_R_NXRRSET;
                } else {
-                       RUNTIME_CHECK(dns_name_copy(name, st->r_name, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, st->r_name);
                        result = ns_query_recurse(client, type, st->r_name,
                                                  NULL, NULL, resuming);
                        if (result == ISC_R_SUCCESS) {
@@ -3101,7 +3101,7 @@ rpz_save_p(dns_rpz_st_t *st, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
        st->m.rpz = rpz;
        st->m.type = rpz_type;
        st->m.policy = policy;
-       RUNTIME_CHECK(dns_name_copy(p_name, st->p_name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(p_name, st->p_name);
        st->m.prefix = prefix;
        st->m.result = result;
        SAVE(st->m.zone, *zonep);
@@ -4602,7 +4602,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
                        dns_name_getlabelsequence(qname, skip, labels - skip,
                                                  found);
        } else if (found != NULL)
-               RUNTIME_CHECK(dns_name_copy(&name, found, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(&name, found);
        return;
 }
 
@@ -4791,7 +4791,7 @@ redirect(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
        }
 
        CTRACE(ISC_LOG_DEBUG(3), "redirect: found data: done");
-       RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(found, name);
        if (dns_rdataset_isassociated(rdataset))
                dns_rdataset_disassociate(rdataset);
        if (dns_rdataset_isassociated(&trdataset)) {
@@ -4891,7 +4891,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
                if (result != ISC_R_SUCCESS)
                        return (ISC_R_NOTFOUND);
        } else {
-               RUNTIME_CHECK(dns_name_copy(redirectname, client->view->redirectzone, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(redirectname, client->view->redirectzone);
        }
 
        options = 0;
@@ -4961,7 +4961,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
        result = dns_name_concatenate(found, dns_rootname, found, NULL);
        RUNTIME_CHECK(result == ISC_R_SUCCESS);
 
-       RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(found, name);
        if (dns_rdataset_isassociated(rdataset))
                dns_rdataset_disassociate(rdataset);
        if (dns_rdataset_isassociated(&trdataset)) {
@@ -5518,8 +5518,7 @@ query_lookup(query_ctx_t *qctx) {
         * Fixup fname and sigrdataset.
         */
        if (qctx->dns64 && qctx->rpz) {
-               RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname,
-                                           qctx->fname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->client->query.qname, qctx->fname);
                if (qctx->sigrdataset != NULL &&
                    dns_rdataset_isassociated(qctx->sigrdataset))
                {
@@ -5693,16 +5692,14 @@ recparam_update(ns_query_recparam_t *param, dns_rdatatype_t qtype,
                param->qname = NULL;
        } else {
                param->qname = dns_fixedname_initname(&param->fqname);
-               RUNTIME_CHECK(dns_name_copy(qname, param->qname, NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(qname, param->qname);
        }
 
        if (qdomain == NULL) {
                param->qdomain = NULL;
        } else {
                param->qdomain = dns_fixedname_initname(&param->fqdomain);
-               RUNTIME_CHECK(dns_name_copy(qdomain, param->qdomain, NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(qdomain, param->qdomain);
        }
 }
 
@@ -6039,7 +6036,7 @@ query_resume(query_ctx_t *qctx) {
                tname = dns_fixedname_name(&qctx->event->foundname);
        }
 
-       RUNTIME_CHECK(dns_name_copy(tname, qctx->fname, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(tname, qctx->fname);
 
        if (qctx->rpz_st != NULL &&
            (qctx->rpz_st->state & DNS_RPZ_RECURSING) != 0) {
@@ -6335,7 +6332,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) {
                SAVE(qctx->rpz_st->q.node, qctx->node);
                SAVE(qctx->rpz_st->q.rdataset, qctx->rdataset);
                SAVE(qctx->rpz_st->q.sigrdataset, qctx->sigrdataset);
-               RUNTIME_CHECK(dns_name_copy(qctx->fname, qctx->rpz_st->fname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->fname, qctx->rpz_st->fname);
                qctx->rpz_st->q.result = result;
                qctx->client->query.attributes |= NS_QUERYATTR_RECURSING;
                return (ISC_R_COMPLETE);
@@ -6360,9 +6357,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) {
                 * we looked up even if we were stopped short
                 * in recursion or for a deferral.
                 */
-               RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname,
-                                       qctx->fname, NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->client->query.qname, qctx->fname);
                rpz_clean(&qctx->zone, &qctx->db, &qctx->node, NULL);
                if (qctx->rpz_st->m.rdataset != NULL) {
                        ns_client_putrdataset(qctx->client, &qctx->rdataset);
@@ -6535,8 +6530,7 @@ query_rpzcname(query_ctx_t *qctx, dns_name_t *cname) {
                        return (result);
                }
        } else {
-               RUNTIME_CHECK(dns_name_copy(cname, qctx->fname, NULL)
-                             == ISC_R_SUCCESS);
+               dns_name_copynf(cname, qctx->fname);
        }
 
        ns_client_keepname(client, qctx->fname, qctx->dbuf);
@@ -7766,7 +7760,7 @@ query_prepare_delegation_response(query_ctx_t *qctx) {
         * it here in case we need it.
         */
        dns_fixedname_init(&qctx->dsname);
-       RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->dsname), NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(qctx->fname, dns_fixedname_name(&qctx->dsname));
 
        /*
         * This is the best answer.
@@ -8219,7 +8213,7 @@ query_nodata(query_ctx_t *qctx, isc_result_t res) {
                                return (ns_query_done(qctx));;
                        }
                }
-               RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname, qctx->fname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->client->query.qname, qctx->fname);
                qctx->dns64 = false;
 #ifdef dns64_bis_return_excluded_addresses
                /*
@@ -8631,7 +8625,8 @@ query_redirect(query_ctx_t *qctx)  {
                SAVE(qctx->client->query.redirect.sigrdataset,
                     qctx->sigrdataset);
                qctx->client->query.redirect.result = DNS_R_NCACHENXDOMAIN;
-               RUNTIME_CHECK(dns_name_copy(qctx->fname, qctx->client->query.redirect.fname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->fname,
+                                  qctx->client->query.redirect.fname);
                qctx->client->query.redirect.authoritative =
                        qctx->authoritative;
                qctx->client->query.redirect.is_zone = qctx->is_zone;
@@ -8741,7 +8736,7 @@ query_synthnodata(query_ctx_t *qctx, const dns_name_t *signer,
                goto cleanup;
        }
 
-       RUNTIME_CHECK(dns_name_copy(signer, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(signer, name);
 
        /*
         * Add SOA record. Omit the RRSIG if DNSSEC was not requested.
@@ -8806,7 +8801,7 @@ query_synthwildcard(query_ctx_t *qctx, dns_rdataset_t *rdataset,
                result = ISC_R_NOMEMORY;
                goto cleanup;
        }
-       RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(qctx->client->query.qname, name);
 
        cloneset = ns_client_newrdataset(qctx->client);
        if (cloneset == NULL) {
@@ -8968,7 +8963,7 @@ query_synthnxdomain(query_ctx_t *qctx,
                goto cleanup;
        }
 
-       RUNTIME_CHECK(dns_name_copy(signer, name, NULL) == ISC_R_SUCCESS);
+       dns_name_copynf(signer, name);
 
        /*
         * Add SOA record. Omit the RRSIG if DNSSEC was not requested.
@@ -8999,7 +8994,7 @@ query_synthnxdomain(query_ctx_t *qctx,
                        goto cleanup;
                }
 
-               RUNTIME_CHECK(dns_name_copy(nowild, name, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(nowild, name);
 
                cloneset = ns_client_newrdataset(qctx->client);
                clonesigset = ns_client_newrdataset(qctx->client);
@@ -9052,7 +9047,7 @@ checksignames(dns_name_t *signer, dns_rdataset_t *sigrdataset) {
                result = dns_rdata_tostruct(&rdata, &rrsig, NULL);
                RUNTIME_CHECK(result == ISC_R_SUCCESS);
                if (dns_name_countlabels(signer) == 0) {
-                       RUNTIME_CHECK(dns_name_copy(&rrsig.signer, signer, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(&rrsig.signer, signer);
                } else if (!dns_name_equal(signer, &rrsig.signer)) {
                        return (ISC_R_FAILURE);
                }
@@ -9469,7 +9464,8 @@ query_cname(query_ctx_t *qctx) {
            (qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0)
        {
                dns_fixedname_init(&qctx->wildcardname);
-               RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->fname,
+                                  dns_fixedname_name(&qctx->wildcardname));
                qctx->need_wildcardproof = true;
        }
 
@@ -9581,7 +9577,8 @@ query_dname(query_ctx_t *qctx) {
            (qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0)
        {
                dns_fixedname_init(&qctx->wildcardname);
-               RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->fname,
+                                  dns_fixedname_name(&qctx->wildcardname));
                qctx->need_wildcardproof = true;
        }
 
@@ -9773,7 +9770,8 @@ query_prepresponse(query_ctx_t *qctx) {
            (qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0)
        {
                dns_fixedname_init(&qctx->wildcardname);
-               RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(qctx->fname,
+                                  dns_fixedname_name(&qctx->wildcardname));
                qctx->need_wildcardproof = true;
        }
 
@@ -10355,7 +10353,7 @@ query_addwildcardproof(query_ctx_t *qctx, bool ispositive,
                /*
                 * Find the closest encloser.
                 */
-               RUNTIME_CHECK(dns_name_copy(name, cname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name, cname);
                while (result == DNS_R_NXDOMAIN) {
                        labels = dns_name_countlabels(cname) - 1;
                        /*
@@ -10408,7 +10406,7 @@ query_addwildcardproof(query_ctx_t *qctx, bool ispositive,
                 */
                labels = dns_name_countlabels(cname) + 1;
                if (dns_name_countlabels(name) == labels)
-                       RUNTIME_CHECK(dns_name_copy(name, wname, NULL) == ISC_R_SUCCESS);
+                       dns_name_copynf(name, wname);
                else
                        dns_name_split(name, labels, NULL, wname);
 
index 049442ac9f52cdf52609f238b0d8c68d10287ca2..6d21577d4b641552c9cab2098f67c2e04392f1a7 100644 (file)
@@ -708,7 +708,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
                add_rr_prepare_ctx_t *ctx = rr_action_data;
 
                ctx->oldname = dns_fixedname_initname(&fixed);
-               RUNTIME_CHECK(dns_name_copy(name, ctx->oldname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name, ctx->oldname);
                dns_rdataset_getownercase(&rdataset, ctx->oldname);
        }
 
@@ -1042,7 +1042,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
        t = ISC_LIST_HEAD(temp->tuples);
        while (t != NULL) {
                name = &t->name;
-               RUNTIME_CHECK(dns_name_copy(name, tmpname, NULL) == ISC_R_SUCCESS);
+               dns_name_copynf(name, tmpname);
                *typep = t->rdata.type;
 
                /* A new unique name begins here. */
index 45d268a22df1cd9c9bdf4c831ad64e487688b1dc..dca9c431e5bf1c7366194f813b3eeb38797de05d 100644 (file)
@@ -935,7 +935,7 @@ resolve_ns(isc_task_t *task, isc_event_t *event) {
                                ISC_LIST_APPEND(trans->nslist, pns, link);
                                ISC_LIST_INIT(pns->servers);
 
-                               RUNTIME_CHECK(dns_name_copy(&ns.name, pns->name, NULL) == ISC_R_SUCCESS);
+                               dns_name_copynf(&ns.name, pns->name);
                                dns_rdata_reset(&rdata);
                                dns_rdata_freestruct(&ns);
                        }