]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
reverse: add assert for clang analyzer
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 17 Sep 2025 06:24:51 +0000 (08:24 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 17 Sep 2025 06:25:08 +0000 (08:25 +0200)
src/knot/zone/reverse.c

index f0321124836f44b41ce48fa1570ba37942e99d4b..fedbed4df74961fad9443ed557d1c4035abee62f 100644 (file)
@@ -164,6 +164,8 @@ int zone_reverse(zone_contents_t *from, zone_contents_t *to_conts,
                  zone_update_t *to_upd, bool to_upd_rem,
                  zone_include_method_t method)
 {
+       assert((to_conts != NULL) != (to_upd != NULL));
+
        const knot_dname_t *to_name;
        if (to_upd != NULL) {
                to_name = to_upd->zone->name;