diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-04 13:31:29 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-21 11:04:11 +0100 |
commit | 9a1bbc6642e241c8901f159253b40e19761fb059 (patch) | |
tree | 8db9a22f082194ddf0171565cc4bafc35b95c64f /src | |
parent | hwdb: update database (diff) | |
download | systemd-9a1bbc6642e241c8901f159253b40e19761fb059.tar.gz systemd-9a1bbc6642e241c8901f159253b40e19761fb059.tar.bz2 systemd-9a1bbc6642e241c8901f159253b40e19761fb059.zip |
resolved: use structured initialization for DnsScope
Diffstat (limited to 'src')
-rw-r--r-- | src/resolve/resolved-dns-scope.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 35c3804db..8ea46054a 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -30,15 +30,17 @@ int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, int assert(m); assert(ret); - s = new0(DnsScope, 1); + s = new(DnsScope, 1); if (!s) return -ENOMEM; - s->manager = m; - s->link = l; - s->protocol = protocol; - s->family = family; - s->resend_timeout = MULTICAST_RESEND_TIMEOUT_MIN_USEC; + *s = (DnsScope) { + .manager = m, + .link = l, + .protocol = protocol, + .family = family, + .resend_timeout = MULTICAST_RESEND_TIMEOUT_MIN_USEC, + }; if (protocol == DNS_PROTOCOL_DNS) { /* Copy DNSSEC mode from the link if it is set there, |