mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
libdns: Avoid using compound literals (6).
* dirmngr/dns.h (dns_rr_i_new): Remove. (dns_rr_i_init): Remove unused second argument. * dirmngr/dns.c (dns_p_dump, dns_hints_query, print_packet) (parse_packet): Use automatic variable for struct dns_rr_i. (dns_d_cname): No need to call dns_rr_i_init after memset 0. (dns_rr_i_init): Remove unused second argument. Return nothing. * dirmngr/dns-stuff.c (resolve_addr_libdns, get_dns_cert_libdns) (getsrv_libdns): Follow the change of dns_rr_i_init. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
a1ccfe2b37
commit
6501e59d36
3 changed files with 51 additions and 33 deletions
|
@ -503,9 +503,6 @@ DNS_PUBLIC int dns_rr_cmp(struct dns_rr *, struct dns_packet *, struct dns_rr *,
|
|||
DNS_PUBLIC size_t dns_rr_print(void *, size_t, struct dns_rr *, struct dns_packet *, int *);
|
||||
|
||||
|
||||
#define dns_rr_i_new(P, ...) \
|
||||
dns_rr_i_init(&dns_quietinit((struct dns_rr_i){ 0, __VA_ARGS__ }), (P))
|
||||
|
||||
struct dns_rr_i {
|
||||
enum dns_section section;
|
||||
const void *name;
|
||||
|
@ -533,7 +530,7 @@ DNS_PUBLIC int dns_rr_i_order(struct dns_rr *, struct dns_rr *, struct dns_rr_i
|
|||
|
||||
DNS_PUBLIC int dns_rr_i_shuffle(struct dns_rr *, struct dns_rr *, struct dns_rr_i *, struct dns_packet *);
|
||||
|
||||
DNS_PUBLIC struct dns_rr_i *dns_rr_i_init(struct dns_rr_i *, struct dns_packet *);
|
||||
DNS_PUBLIC void dns_rr_i_init(struct dns_rr_i *);
|
||||
|
||||
#define dns_rr_i_save(i) ((i)->saved = (i)->state)
|
||||
#define dns_rr_i_rewind(i) ((i)->state = (i)->saved)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue