Diffusion GnuPG 1318d1e2d509

libdns: Avoid using compound literals.

Authored by gniibe on Feb 26 2019, 1:42 AM.

Description

libdns: Avoid using compound literals.

* dirmngr/dns.c (dns_inet_pton, dns_so_tcp_keep): Use automatic
variables.
(dns_poll, dns_send_nopipe): Likewise, adding const qualifier.

Compound literals is a feature of C99. Because we only use C90 plus
some limited features, in the project, it's better to avoid it.

Besides, we make sure when it's read-only.

(cherry picked from commit 1c405499388fd5bed0968ab5c6c5d1b3373537b9)

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

Details

Committed
wernerMar 7 2019, 1:01 PM
Parents
rG557c721e787e: dirmngr: Add CSRF protection exception for protonmail.
Branches
Unknown
Tags
Unknown