mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Add macro to initalise the common part of a rdata struct.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user