]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Define DNS_RDATASET_INIT for static initialisation
authorMark Andrews <marka@isc.org>
Fri, 13 Jan 2023 03:30:45 +0000 (14:30 +1100)
committerMark Andrews <marka@isc.org>
Wed, 8 Feb 2023 21:29:43 +0000 (08:29 +1100)
lib/dns/include/dns/rdataset.h
lib/dns/rdataset.c

index d240d2e019739061b234091c375e13887a47bb96..566ea44cf9396d7f23a5ef2e9cc8fecdd6f19da0 100644 (file)
@@ -146,6 +146,14 @@ struct dns_rdataset {
        /*@}*/
 };
 
+#define DNS_RDATASET_COUNT_UNDEFINED UINT32_MAX
+
+#define DNS_RDATASET_INIT                                                  \
+       {                                                                  \
+               .magic = DNS_RDATASET_MAGIC, .link = ISC_LINK_INITIALIZER, \
+               .count = DNS_RDATASET_COUNT_UNDEFINED                      \
+       }
+
 /*!
  * \def DNS_RDATASETATTR_RENDERED
  *     Used by message.c to indicate that the rdataset was rendered.
index 85f21fdb841fa1f8f8fb1fb6aa2e71579ca54086..2367ecca64d35be824958d3ae4b1bae012ae1795 100644 (file)
@@ -46,8 +46,6 @@ dns_trust_totext(dns_trust_t trust) {
        return (trustnames[trust]);
 }
 
-#define DNS_RDATASET_COUNT_UNDEFINED UINT32_MAX
-
 void
 dns_rdataset_init(dns_rdataset_t *rdataset) {
        /*