links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 49dcc0d7d46daed75ade9b0a6aa0e3f556c034cd
Parent: 86cd1af5bf8a014a43ade98a43547f8100c6c352
Author: opask
Date:   Fri, 14 Dec 2018 22:08:08 -0700

dns.c: small style fix

Diffstat:
Mdns.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dns.c b/dns.c @@ -22,7 +22,7 @@ struct dnsquery { struct dnsquery **s; struct lookup_result *addr; int addr_preference; - char name[1]; + char name[]; }; static int dns_cache_addr_preference = -1; @@ -454,20 +454,20 @@ delete_last: unsigned char *print_address(struct host_address *a) { #define SCOPE_ID_LEN 11 - static unsigned char buffer[INET6_ADDRSTRLEN + SCOPE_ID_LEN]; + static char buffer[INET6_ADDRSTRLEN + SCOPE_ID_LEN]; union { struct in_addr in; struct in6_addr in6; char pad[16]; } u; memcpy(&u, a->addr, 16); - if (!inet_ntop(a->af, &u, cast_char buffer, sizeof buffer - SCOPE_ID_LEN)) + if (!inet_ntop(a->af, &u, buffer, sizeof(buffer) - SCOPE_ID_LEN)) return NULL; if (a->scope_id) { - unsigned char *end = cast_uchar strchr(cast_const_char buffer, 0); - snprintf(cast_char end, buffer + sizeof(buffer) - end, "%%%u", a->scope_id); + char *end = strchr(buffer, 0); + snprintf(end, buffer + sizeof(buffer) - end, "%%%u", a->scope_id); } - return buffer; + return (unsigned char *)buffer; } int ipv6_full_access(void)