mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 09:52:04 -04:00
Add macro to initalise the common part of a rdata struct.
This commit is contained in:
parent
d2b5fe92a4
commit
ba6f0d85b4
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue