From: Michał Kępień Date: Thu, 10 May 2018 07:43:38 +0000 (+0200) Subject: Remove redundant assertions X-Git-Tag: v9.13.0~26^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15afdf94ef81778957d0cec74ec285f759323263;p=thirdparty%2Fbind9.git Remove redundant assertions The ENSURE assertion at the end of dns_diff_appendminimal() is not needed because it is placed right after code which resets *tuplep to NULL if it is not NULL already. The INSIST assertion in move_matching_tuples() checks the same pointer again. --- diff --git a/lib/dns/diff.c b/lib/dns/diff.c index fe7181b7734..7ed4faeba51 100644 --- a/lib/dns/diff.c +++ b/lib/dns/diff.c @@ -196,8 +196,6 @@ dns_diff_appendminimal(dns_diff_t *diff, dns_difftuple_t **tuplep) ISC_LIST_APPEND(diff->tuples, *tuplep, link); *tuplep = NULL; } - - ENSURE(*tuplep == NULL); } static isc_stdtime_t diff --git a/lib/dns/zone.c b/lib/dns/zone.c index cf954d9869f..0f63fccda1f 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -7318,7 +7318,6 @@ move_matching_tuples(dns_difftuple_t *cur, dns_diff_t *src, dns_diff_t *dst) { dns_difftuple_t *next = find_next_matching_tuple(cur); ISC_LIST_UNLINK(src->tuples, cur, link); dns_diff_appendminimal(dst, &cur); - INSIST(cur == NULL); cur = next; } while (cur != NULL); }