Add dns_fixedname_initname()
The following pattern is repeated in many places in BIND code:
dns_fixedname_t fixed;
dns_name_t *name;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&name);
Let's add a helper function that does the equivalent:
dns_fixedname_t fixed;
dns_name_t *name;
name = dns_fixedname_initname(&fixed);
Implementation would be:
dns_name_t *
dns_fixedname_initname(dns_fixedname_t *fixed) {
dns_fixedname_init(fixed);
return (dns_fixedname_name(fixed));
}
Edited by Michał Kępień