Home GnuPG
Diffusion GnuPG 500151e6daf5

libdns: Avoid using compound literals (5).

Description

libdns: Avoid using compound literals (5).

* dirmngr/dns.h (dns_rr_foreach): Don't use dns_rr_i_new.
Call dns_rr_grep with NULL.
* dirmngr/dns.c (dns_rr_grep): Support NULL for error_.

Here we still use C99 feature of struct member initialization in
dns_rr_foreach, for struct dns_rr_i. Note that in C99, it guarantees
non-specified member fields are initialized by zero. So, there's no
need to use dns_rr_i_new at all.

(cherry picked from commit a1ccfe2b37847cce0db2fb94a7365c9fa501eda4)

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

Details

Provenance
gniibeAuthored on Feb 26 2019, 3:43 AM
wernerCommitted on Mar 7 2019, 1:02 PM
Parents
rG229302aecf8d: libdns: Avoid using compound literals (4).
Branches
Unknown
Tags
Unknown