diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2019-02-26 04:13:35 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2019-02-26 04:13:35 +0100 |
commit | d661acd483236d34720a4959fc816d05f89c2cb7 (patch) | |
tree | 7e546118b6e1d8f0841149618854bfdbc78dd519 /dirmngr/dns.h | |
parent | libdns: Avoid using compound literals (6). (diff) | |
download | gnupg2-d661acd483236d34720a4959fc816d05f89c2cb7.tar.xz gnupg2-d661acd483236d34720a4959fc816d05f89c2cb7.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | dirmngr/dns.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/dirmngr/dns.h b/dirmngr/dns.h index 49b1c78bb..afc19a19a 100644 --- a/dirmngr/dns.h +++ b/dirmngr/dns.h @@ -1032,9 +1032,6 @@ DNS_PUBLIC void dns_cache_close(struct dns_cache *); #define DNS_OPTS_INITIALIZER_ { 0, 0 }, 0, 0 #define DNS_OPTS_INITIALIZER { DNS_OPTS_INITIALIZER_ } -#define DNS_OPTS_INIT(...) { DNS_OPTS_INITIALIZER_, __VA_ARGS__ } - -#define dns_opts(...) (&dns_quietinit((struct dns_options)DNS_OPTS_INIT(__VA_ARGS__))) struct dns_options { /* |