Skip to content
Snippets Groups Projects
Commit 70746415 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Review: Fixed remarks for zone-sign.c.

parent 16bd52e1
No related branches found
No related tags found
No related merge requests found
...@@ -519,14 +519,10 @@ static int sign_node_rrsets(const knot_node_t *node, ...@@ -519,14 +519,10 @@ static int sign_node_rrsets(const knot_node_t *node,
} }
if (result != KNOT_EOK) { if (result != KNOT_EOK) {
break; return result;
} }
} }
if (result != KNOT_EOK) {
return result;
}
return remove_standalone_rrsigs(node, rrsigs, changeset); return remove_standalone_rrsigs(node, rrsigs, changeset);
} }
...@@ -837,8 +833,8 @@ static int add_missing_dnskeys(const knot_rrset_t *soa, ...@@ -837,8 +833,8 @@ static int add_missing_dnskeys(const knot_rrset_t *soa,
knot_rrset_t *to_add = NULL; knot_rrset_t *to_add = NULL;
int result = KNOT_EOK; int result = KNOT_EOK;
bool add_all = dnskeys == NULL || bool add_all = (dnskeys == NULL ||
knot_rrset_rr_ttl(dnskeys, 0) != knot_rrset_rr_ttl(soa, 0); knot_rrset_rr_ttl(dnskeys, 0) != knot_rrset_rr_ttl(soa, 0));
for (int i = 0; i < zone_keys->count; i++) { for (int i = 0; i < zone_keys->count; i++) {
const knot_zone_key_t *key = &zone_keys->keys[i]; const knot_zone_key_t *key = &zone_keys->keys[i];
...@@ -1016,10 +1012,10 @@ static int update_dnskeys(const knot_zone_contents_t *zone, ...@@ -1016,10 +1012,10 @@ static int update_dnskeys(const knot_zone_contents_t *zone,
return result; return result;
} }
bool modified = knot_changeset_size(changeset) != changes_before; bool modified = (knot_changeset_size(changeset) != changes_before);
bool signatures_exist = dnskeys && bool signatures_exist = (dnskeys &&
all_signatures_exist(dnskeys, dnskey_rrsig, all_signatures_exist(dnskeys, dnskey_rrsig,
zone_keys, policy); zone_keys, policy));
knot_rrset_deep_free(&dnskey_rrsig, true, NULL); knot_rrset_deep_free(&dnskey_rrsig, true, NULL);
if (!modified && signatures_exist) { if (!modified && signatures_exist) {
return KNOT_EOK; return KNOT_EOK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment