]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
slight refactoring in validated()
authorEvan Hunt <each@isc.org>
Wed, 26 Feb 2025 21:59:19 +0000 (13:59 -0800)
committerEvan Hunt <each@isc.org>
Wed, 26 Feb 2025 23:28:57 +0000 (15:28 -0800)
fix some minor code redundancies.

lib/dns/resolver.c

index 92e32d98746adc557d049dbf3f08f2bcb5357e78..fd826d86adc3e37c9597431d2d2af745f1230596 100644 (file)
@@ -5263,7 +5263,7 @@ validated(void *arg) {
         * is returned, and that the rdatasets are bound.
         */
        if (val->result == ISC_R_SUCCESS && !negative &&
-           val->rdataset != NULL && CHAINING(val->rdataset))
+           CHAINING(val->rdataset))
        {
                if (val->rdataset->type == dns_rdatatype_cname) {
                        eresult = DNS_R_CNAME;
@@ -5357,18 +5357,14 @@ validated(void *arg) {
                nextval = ISC_LIST_HEAD(fctx->validators);
                if (nextval != NULL) {
                        dns_validator_send(nextval);
-                       goto cleanup_fetchctx;
                } else if (sentresponse) {
                        done = true;
-                       goto cleanup_fetchctx;
                } else if (result == DNS_R_BROKENCHAIN) {
                        done = true;
-                       goto cleanup_fetchctx;
                } else {
                        fctx_try(fctx, true);
-                       goto cleanup_fetchctx;
                }
-               UNREACHABLE();
+               goto cleanup_fetchctx;
        }
 
        if (negative) {