2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 06:55:30 +00:00

remove review fprintf

This commit is contained in:
Mark Andrews
2016-11-02 18:03:33 +11:00
parent 2b2b85c897
commit a0caf66c97
2 changed files with 2 additions and 27 deletions

View File

@@ -579,19 +579,6 @@ initialize_action(void) {
*/ */
static void static void
is_insecure(isc_prefix_t *prefix, void **data) { 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. * 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 * If a loopback address found and there is the other family
* doesn't exist or is negative, return. * doesn't exist or is negative, return.
*/ */
if (bitlen == 32 && if (prefix->bitlen == 32 &&
htonl(prefix->add.sin.s_addr) == INADDR_LOOPBACK && htonl(prefix->add.sin.s_addr) == INADDR_LOOPBACK &&
(data[1] == NULL || !* (isc_boolean_t *) data[1]) && (data[1] == NULL || !* (isc_boolean_t *) data[1]) &&
(data[3] == NULL || !* (isc_boolean_t *) data[3])) (data[3] == NULL || !* (isc_boolean_t *) data[3]))
return; return;
if (bitlen == 128 && if (prefix->bitlen == 128 &&
IN6_IS_ADDR_LOOPBACK(&prefix->add.sin6) && IN6_IS_ADDR_LOOPBACK(&prefix->add.sin6) &&
(data[0] == NULL || !* (isc_boolean_t *) data[0]) && (data[0] == NULL || !* (isc_boolean_t *) data[0]) &&
(data[2] == NULL || !* (isc_boolean_t *) data[2])) (data[2] == NULL || !* (isc_boolean_t *) data[2]))

View File

@@ -87,13 +87,9 @@ ATF_TC_BODY(dns_acl_isinsecure, tc) {
result = dns_acl_merge(notany, any, ISC_FALSE); result = dns_acl_merge(notany, any, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
fprintf(stderr, "any\n");
ATF_CHECK(dns_acl_isinsecure(any)); /* any; */ ATF_CHECK(dns_acl_isinsecure(any)); /* any; */
fprintf(stderr, "none\n");
ATF_CHECK(!dns_acl_isinsecure(none)); /* none; */ ATF_CHECK(!dns_acl_isinsecure(none)); /* none; */
fprintf(stderr, "!any\n");
ATF_CHECK(!dns_acl_isinsecure(notany)); /* !any; */ ATF_CHECK(!dns_acl_isinsecure(notany)); /* !any; */
fprintf(stderr, "!none\n");
ATF_CHECK(!dns_acl_isinsecure(notnone)); /* !none; */ ATF_CHECK(!dns_acl_isinsecure(notnone)); /* !none; */
dns_acl_detach(&any); dns_acl_detach(&any);
@@ -181,21 +177,13 @@ fprintf(stderr, "!none\n");
result = dns_acl_merge(notneg4neg6, neg4neg6, ISC_FALSE); result = dns_acl_merge(notneg4neg6, neg4neg6, ISC_FALSE);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS); ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
fprintf(stderr, "pos4pos6\n");
ATF_CHECK(dns_acl_isinsecure(pos4pos6)); ATF_CHECK(dns_acl_isinsecure(pos4pos6));
fprintf(stderr, "notpos4pos6\n");
ATF_CHECK(!dns_acl_isinsecure(notpos4pos6)); ATF_CHECK(!dns_acl_isinsecure(notpos4pos6));
fprintf(stderr, "neg4pos6\n");
ATF_CHECK(dns_acl_isinsecure(neg4pos6)); ATF_CHECK(dns_acl_isinsecure(neg4pos6));
fprintf(stderr, "notneg4pos6\n");
ATF_CHECK(!dns_acl_isinsecure(notneg4pos6)); ATF_CHECK(!dns_acl_isinsecure(notneg4pos6));
fprintf(stderr, "pos4neg6\n");
ATF_CHECK(dns_acl_isinsecure(pos4neg6)); ATF_CHECK(dns_acl_isinsecure(pos4neg6));
fprintf(stderr, "notpos4neg6\n");
ATF_CHECK(!dns_acl_isinsecure(notpos4neg6)); ATF_CHECK(!dns_acl_isinsecure(notpos4neg6));
fprintf(stderr, "neg4neg6\n");
ATF_CHECK(!dns_acl_isinsecure(neg4neg6)); ATF_CHECK(!dns_acl_isinsecure(neg4neg6));
fprintf(stderr, "notneg4neg6\n");
ATF_CHECK(!dns_acl_isinsecure(notneg4neg6)); ATF_CHECK(!dns_acl_isinsecure(notneg4neg6));
dns_acl_detach(&pos4pos6); dns_acl_detach(&pos4pos6);