]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/resolve: eliminate more double initialization
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 15 Nov 2018 14:43:58 +0000 (15:43 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 21 Nov 2018 14:33:41 +0000 (15:33 +0100)
Again, it's just a mechanical change,
looking at occurences of the identifiers.

lib/resolve.c

index d4f0266f183c59351d2bc1e061449c2ffbd0e412..8781ebebe8eedead425c08db456b01376edd9655 100644 (file)
@@ -1063,10 +1063,8 @@ static int forward_trust_chain_check(struct kr_request *request, struct kr_query
        bool nods, ds_req, ns_req, minimized, ns_exist;
        do {
                wanted_name = start_name;
-               nods = false;
                ds_req = false;
                ns_req = false;
-               minimized = false;
                ns_exist = true;
 
                int cut_labels = knot_dname_labels(qry->zone_cut.name, NULL);
@@ -1085,11 +1083,7 @@ static int forward_trust_chain_check(struct kr_request *request, struct kr_query
                            knot_dname_is_equal(q->sname, wanted_name)) {
                                if (q->stype == KNOT_RRTYPE_DS) {
                                        ds_req = true;
-                                       if (q->flags.DNSSEC_NODS) {
-                                               nods = true;
-                                       }
                                        if (q->flags.CNAME) {
-                                               nods = true;
                                                ns_exist = false;
                                        } else if (!(q->flags.DNSSEC_OPTOUT)) {
                                                int ret = kr_dnssec_matches_name_and_type(&request->auth_selected, q->uid,
@@ -1098,7 +1092,6 @@ static int forward_trust_chain_check(struct kr_request *request, struct kr_query
                                        }
                                } else {
                                        if (q->flags.CNAME) {
-                                               nods = true;
                                                ns_exist = false;
                                        }
                                        ns_req = true;
@@ -1120,6 +1113,7 @@ static int forward_trust_chain_check(struct kr_request *request, struct kr_query
                        return KR_STATE_PRODUCE;
                }
 
+               /* set `nods` */
                if ((qry->stype == KNOT_RRTYPE_DS) &&
                    knot_dname_is_equal(wanted_name, qry->sname)) {
                        nods = true;