diff --git a/lib/dns/rdata/rdatastructpre.h b/lib/dns/rdata/rdatastructpre.h index 110af4b76d..85302f0d82 100644 --- a/lib/dns/rdata/rdatastructpre.h +++ b/lib/dns/rdata/rdatastructpre.h @@ -31,3 +31,9 @@ typedef struct dns_rdatacommon { ISC_LINK(struct dns_rdatacommon) link; } dns_rdatacommon_t; +#define DNS_RDATACOMMON_INIT(DATA, RDTYPE, RDCLASS) \ + do { \ + (DATA)->common.rdtype = (RDTYPE); \ + (DATA)->common.rdclass = (RDCLASS); \ + ISC_LINK_INIT(&(DATA)->common, link); \ + } while (0)