]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Add assertion to please static analyzer
authorRalph Dolmans <ralph@nlnetlabs.nl>
Mon, 3 Feb 2020 15:44:21 +0000 (16:44 +0100)
committerRalph Dolmans <ralph@nlnetlabs.nl>
Mon, 3 Feb 2020 15:44:21 +0000 (16:44 +0100)
doc/Changelog
respip/respip.c

index 5640c44f7f08e94b78f90c597ec8332f7dad7155..99ebfcb049521932085314dd73eea8cb3685304c 100644 (file)
@@ -1,3 +1,6 @@
+-3 February 2020: Ralph
+       - Add assertion to please static analyzer
+
 31 January 2020: Wouter
        - Fix fclose on error in TLS session ticket code.
 
index 3dce5fa7b5e0bcf7b0d6cf87f903f78b5cf35d81..ec7026adda45ea8e6ccd4178b349620bad70ffb0 100644 (file)
@@ -913,6 +913,8 @@ respip_rewrite_reply(const struct query_info* qinfo,
        view = cinfo->view;
        ipset = cinfo->respip_set;
 
+       log_assert(ipset);
+
        /** Try to use response-ip config from the view first; use
          * global response-ip config if we don't have the view or we don't
          * have the matching per-view config (and the view allows the use
@@ -936,7 +938,7 @@ respip_rewrite_reply(const struct query_info* qinfo,
                if(!raddr && !view->isfirst)
                        goto done;
        }
-       if(!raddr && ipset && (raddr = respip_addr_lookup(rep, ipset,
+       if(!raddr && (raddr = respip_addr_lookup(rep, ipset,
                &rrset_id))) {
                action = (enum respip_action)local_data_find_tag_action(
                        raddr->taglist, raddr->taglen, ctaglist, ctaglen,