mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
libdns: Avoid using compound literals (2).
* dirmngr/dns.h (dns_strsection1, dns_strsection3): Remove.
(dns_strclass1, dns_strclass3): Remove.
(dns_strtype1, dns_strtype3): Remove.
(dns_strsection, dns_strclass, dns_strtype): Directly use the
function.
* dirmngr/dns.c (dns_strsection): Use automatic variable.
(dns_strclass, dns_strtype): Likewise.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit 455ef62d29
)
This commit is contained in:
parent
1318d1e2d5
commit
ff7d01fc6d
2 changed files with 12 additions and 19 deletions
|
@ -291,25 +291,15 @@ enum dns_rcode {
|
|||
*/
|
||||
#define DNS_STRMAXLEN 47 /* "QUESTION|ANSWER|AUTHORITY|ADDITIONAL" */
|
||||
|
||||
DNS_PUBLIC const char *dns_strsection(enum dns_section, void *, size_t);
|
||||
#define dns_strsection3(a, b, c) \
|
||||
dns_strsection((a), (b), (c))
|
||||
#define dns_strsection1(a) dns_strsection((a), (char [DNS_STRMAXLEN + 1]){ 0 }, DNS_STRMAXLEN + 1)
|
||||
#define dns_strsection(...) DNS_PP_CALL(DNS_PP_XPASTE(dns_strsection, DNS_PP_NARG(__VA_ARGS__)), __VA_ARGS__)
|
||||
DNS_PUBLIC const char *dns_strsection(enum dns_section);
|
||||
|
||||
DNS_PUBLIC enum dns_section dns_isection(const char *);
|
||||
|
||||
DNS_PUBLIC const char *dns_strclass(enum dns_class, void *, size_t);
|
||||
#define dns_strclass3(a, b, c) dns_strclass((a), (b), (c))
|
||||
#define dns_strclass1(a) dns_strclass((a), (char [DNS_STRMAXLEN + 1]){ 0 }, DNS_STRMAXLEN + 1)
|
||||
#define dns_strclass(...) DNS_PP_CALL(DNS_PP_XPASTE(dns_strclass, DNS_PP_NARG(__VA_ARGS__)), __VA_ARGS__)
|
||||
DNS_PUBLIC const char *dns_strclass(enum dns_class);
|
||||
|
||||
DNS_PUBLIC enum dns_class dns_iclass(const char *);
|
||||
|
||||
DNS_PUBLIC const char *dns_strtype(enum dns_type, void *, size_t);
|
||||
#define dns_strtype3(a, b, c) dns_strtype((a), (b), (c))
|
||||
#define dns_strtype1(a) dns_strtype((a), (char [DNS_STRMAXLEN + 1]){ 0 }, DNS_STRMAXLEN + 1)
|
||||
#define dns_strtype(...) DNS_PP_CALL(DNS_PP_XPASTE(dns_strtype, DNS_PP_NARG(__VA_ARGS__)), __VA_ARGS__)
|
||||
DNS_PUBLIC const char *dns_strtype(enum dns_type);
|
||||
|
||||
DNS_PUBLIC enum dns_type dns_itype(const char *);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue