lib: fix formatting nits (part 3)

From `lib/h` to `lib/w`.

part 1: 47a1ab2ebe #19764
part 2: 86b346443b #19800

Closes #19811
This commit is contained in:
Viktor Szakats 2025-12-02 07:25:18 +01:00
parent dc8c0d54a5
commit c3b030b860
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
102 changed files with 2001 additions and 2226 deletions

View file

@ -62,10 +62,10 @@
unsigned int Curl_ipv6_scope(const struct sockaddr *sa)
{
if(sa->sa_family == AF_INET6) {
const struct sockaddr_in6 * sa6 =
(const struct sockaddr_in6 *)(const void *) sa;
const struct sockaddr_in6 *sa6 =
(const struct sockaddr_in6 *)(const void *)sa;
const unsigned char *b = sa6->sin6_addr.s6_addr;
unsigned short w = (unsigned short) ((b[0] << 8) | b[1]);
unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
return IPV6_SCOPE_UNIQUELOCAL;
@ -103,8 +103,7 @@ if2ip_result_t Curl_if2ip(int af,
struct ifaddrs *iface, *head;
if2ip_result_t res = IF2IP_NOT_FOUND;
#if defined(USE_IPV6) && \
!defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
#if defined(USE_IPV6) && !defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
(void)local_scope_id;
#endif
@ -138,7 +137,7 @@ if2ip_result_t Curl_if2ip(int af,
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
/* Include the scope of this interface as part of the address */
scopeid = ((struct sockaddr_in6 *)(void *)iface->ifa_addr)
->sin6_scope_id;
->sin6_scope_id;
/* If given, scope id should match. */
if(local_scope_id && scopeid != local_scope_id) {
@ -248,15 +247,15 @@ if2ip_result_t Curl_if2ip(int af,
const char *interf,
char *buf, size_t buf_size)
{
(void)af;
(void)af;
#ifdef USE_IPV6
(void)remote_scope;
(void)local_scope_id;
(void)remote_scope;
(void)local_scope_id;
#endif
(void)interf;
(void)buf;
(void)buf_size;
return IF2IP_NOT_FOUND;
(void)interf;
(void)buf;
(void)buf_size;
return IF2IP_NOT_FOUND;
}
#endif