From d661acd483236d34720a4959fc816d05f89c2cb7 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 26 Feb 2019 12:13:35 +0900 Subject: 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 --- dirmngr/dns.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'dirmngr/dns.h') 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 { /* -- cgit v1.2.3