]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove review fprintf
authorMark Andrews <marka@isc.org>
Wed, 2 Nov 2016 07:03:33 +0000 (18:03 +1100)
committerMark Andrews <marka@isc.org>
Wed, 2 Nov 2016 07:03:33 +0000 (18:03 +1100)
lib/dns/acl.c
lib/dns/tests/acl_test.c

index 995d2d3c4cb4e5b01c9eae6fe69f18cf4e8e1f2c..78342e2b2af6115ffbb86400bd6bc475e59c2003 100644 (file)
@@ -579,19 +579,6 @@ initialize_action(void) {
  */
 static void
 is_insecure(isc_prefix_t *prefix, void **data) {
-       int bitlen, family, off;
-
-       bitlen = prefix->bitlen;
-       family = prefix->family;
-       
-       off = ISC_RADIX_OFF(prefix);
-fprintf(stderr, "%d %d %d %d %d %d %d\n",
-       bitlen, family, off,
-       data[0] ? (* (isc_boolean_t *) data[0]) : -1,
-       data[1] ? (* (isc_boolean_t *) data[1]) : -1,
-       data[2] ? (* (isc_boolean_t *) data[2]) : -1,
-       data[3] ? (* (isc_boolean_t *) data[3]) : -1);
-
        /*
         * If all nonexistent or negative then this node is secure.
         */
@@ -605,13 +592,13 @@ fprintf(stderr, "%d %d %d %d %d %d %d\n",
         * If a loopback address found and there is the other family
         * doesn't exist or is negative, return.
         */
-       if (bitlen == 32 &&
+       if (prefix->bitlen == 32 &&
            htonl(prefix->add.sin.s_addr) == INADDR_LOOPBACK &&
            (data[1] == NULL || !* (isc_boolean_t *) data[1]) &&
            (data[3] == NULL || !* (isc_boolean_t *) data[3]))
                return;
 
-       if (bitlen == 128 &&
+       if (prefix->bitlen == 128 &&
            IN6_IS_ADDR_LOOPBACK(&prefix->add.sin6) &&
            (data[0] == NULL || !* (isc_boolean_t *) data[0]) &&
            (data[2] == NULL || !* (isc_boolean_t *) data[2]))
index e8495223196cf223f5cdf5d8bc138a10b2d7d7f8..3f872173258ff04668ad53783cc2a06ea91e24da 100644 (file)
@@ -87,13 +87,9 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
        result = dns_acl_merge(notany, any, ISC_FALSE);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-fprintf(stderr, "any\n");
        ATF_CHECK(dns_acl_isinsecure(any));             /* any; */
-fprintf(stderr, "none\n");
        ATF_CHECK(!dns_acl_isinsecure(none));           /* none; */
-fprintf(stderr, "!any\n");
        ATF_CHECK(!dns_acl_isinsecure(notany));         /* !any; */
-fprintf(stderr, "!none\n");
        ATF_CHECK(!dns_acl_isinsecure(notnone));        /* !none; */
 
        dns_acl_detach(&any);
@@ -181,21 +177,13 @@ fprintf(stderr, "!none\n");
        result = dns_acl_merge(notneg4neg6, neg4neg6, ISC_FALSE);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-fprintf(stderr, "pos4pos6\n");
        ATF_CHECK(dns_acl_isinsecure(pos4pos6));
-fprintf(stderr, "notpos4pos6\n");
        ATF_CHECK(!dns_acl_isinsecure(notpos4pos6));
-fprintf(stderr, "neg4pos6\n");
        ATF_CHECK(dns_acl_isinsecure(neg4pos6));
-fprintf(stderr, "notneg4pos6\n");
        ATF_CHECK(!dns_acl_isinsecure(notneg4pos6));
-fprintf(stderr, "pos4neg6\n");
        ATF_CHECK(dns_acl_isinsecure(pos4neg6));
-fprintf(stderr, "notpos4neg6\n");
        ATF_CHECK(!dns_acl_isinsecure(notpos4neg6));
-fprintf(stderr, "neg4neg6\n");
        ATF_CHECK(!dns_acl_isinsecure(neg4neg6));
-fprintf(stderr, "notneg4neg6\n");
        ATF_CHECK(!dns_acl_isinsecure(notneg4neg6));
 
        dns_acl_detach(&pos4pos6);