diff options
author | NIIBE Yutaka <[email protected]> | 2019-02-26 01:34:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-03-07 12:02:05 +0000 |
commit | f0de4fc990767ae5d120a523be51616b0f35f4f6 (patch) | |
tree | 7ea548ff51eb7e5b0d96934b62c8cd5c848c72ba /dirmngr/dns.h | |
parent | libdns: Avoid using compound literals (2). (diff) | |
download | gnupg-f0de4fc990767ae5d120a523be51616b0f35f4f6.tar.gz gnupg-f0de4fc990767ae5d120a523be51616b0f35f4f6.zip |
libdns: Avoid using compound literals (3).
* dirmngr/dns.h (dns_p_new): Remove.
* dirmngr/dns.c (dns_hosts_query): Use dns_p_init with automatic
variable.
(dns_hints_query, dns_res_glue, parse_packet, query_hosts)
(send_query, show_hints, echo_port): Likewise.
--
Implicit automatic allocation by compound literals is confusing
for C90 code.
Signed-off-by: NIIBE Yutaka <[email protected]>
(cherry picked from commit 72efb7840258808cd892b90d871ea1cc1c31d7f5)
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 6dedfbc91..4a9417120 100644 --- a/dirmngr/dns.h +++ b/dirmngr/dns.h @@ -412,9 +412,6 @@ struct dns_packet { #define dns_p_sizeof(P) dns_p_calcsize((P)->end) -/** takes size of maximum desired payload */ -#define dns_p_new(n) (dns_p_init((struct dns_packet *)&(union { unsigned char b[dns_p_calcsize((n))]; struct dns_packet p; }){ { 0 } }, dns_p_calcsize((n)))) - /** takes size of entire packet structure as allocated */ DNS_PUBLIC struct dns_packet *dns_p_init(struct dns_packet *, size_t); |