mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
6501e59d36
commit
d661acd483
3 changed files with 16 additions and 12 deletions
|
@ -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 {
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue