Home GnuPG
Diffusion GnuPG 4ab0fef5dc85

libdns: Avoid using compound literals (7).

Description

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.

(cherry picked from commit d661acd483236d34720a4959fc816d05f89c2cb7)

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Feb 26 2019, 4:13 AM
wernerCommitted on Mar 7 2019, 1:03 PM
Parents
rGf3af1707690b: libdns: Avoid using compound literals (6).
Branches
Unknown
Tags
Unknown