]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
unbound: Explicitly cast from ldns RR type/class to our types
authorMartin Willi <martin@revosec.ch>
Thu, 8 May 2014 11:24:03 +0000 (13:24 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 16 May 2014 13:42:06 +0000 (15:42 +0200)
These definitions are directly derived from the RFC, so it should be safe
to cast them. clang complains about the different types, so cast them
explicitly.

src/libstrongswan/plugins/unbound/unbound_rr.c

index 97c3b193309898c8e55bce0ae560d79bd1acb659..fc69eed00f49dec0f6f5344746e03003f1bba7ef 100644 (file)
@@ -135,8 +135,8 @@ unbound_rr_t *unbound_rr_create_frm_ldns_rr(ldns_rr *rr)
                return NULL;
        }
 
-       this->type = ldns_rr_get_type(rr);
-       this->class = ldns_rr_get_class(rr);
+       this->type = (rr_type_t)ldns_rr_get_type(rr);
+       this->class = (rr_class_t)ldns_rr_get_class(rr);
        this->ttl = ldns_rr_ttl(rr);
        for(i = 0; i < ldns_rr_rd_count(rr); i++)
        {