libdns: Avoid using compound literals (7).
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 26 Feb 2019 03:13:35 +0000 (12:13 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 26 Feb 2019 03:13:35 +0000 (12:13 +0900)
commitd661acd483236d34720a4959fc816d05f89c2cb7
tree7e546118b6e1d8f0841149618854bfdbc78dd519
parent6501e59d3685bb58753c9caea729a4b0eca3942a
libdns: Avoid using compound literals (7).

* dirmngr/dns.h (DNS_OPTS_INIT, dns_opts): Remove.
* dirmngr/dns-stuff.c (libdns_res_open): Use zero-ed, and initialized
automatic variable for opts.
* dirmngr/dns.c (send_query, resolve_query, resolve_addrinfo):
Likewise.

--

In fact, DNS_OPTS_INIT was only needed when args are none.  With
partially specified initialization, C99 guarantees zero-ed other
members just like static object.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
dirmngr/dns-stuff.c
dirmngr/dns.c
dirmngr/dns.h