From: florian Date: Sun, 2 Jun 2024 17:38:44 +0000 (+0000) Subject: Fix indent; pointed out by miod X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e71cb61cb5ace2e1d03e0abb860203639bd4b054;p=openbsd Fix indent; pointed out by miod --- diff --git a/sbin/dhcp6leased/dhcp6leased.c b/sbin/dhcp6leased/dhcp6leased.c index 9d9c4d545b4..7cc309d435b 100644 --- a/sbin/dhcp6leased/dhcp6leased.c +++ b/sbin/dhcp6leased/dhcp6leased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp6leased.c,v 1.5 2024/06/02 17:33:48 florian Exp $ */ +/* $OpenBSD: dhcp6leased.c,v 1.6 2024/06/02 17:38:44 florian Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser @@ -762,39 +762,38 @@ open_udpsock(uint32_t if_index) if (getifaddrs(&ifap) != 0) fatal("getifaddrs"); for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { - if (strcmp(if_name, ifa->ifa_name) != 0) - continue; - if (ifa->ifa_addr == NULL) - continue; - switch (ifa->ifa_addr->sa_family) { - case AF_LINK: { - struct if_data *if_data; - - if_data = (struct if_data *)ifa->ifa_data; - rdomain = if_data->ifi_rdomain; - break; - } - case AF_INET6: { - struct sockaddr_in6 *s6; - s6 = (struct sockaddr_in6 *)ifa->ifa_addr; + if (strcmp(if_name, ifa->ifa_name) != 0) + continue; + if (ifa->ifa_addr == NULL) + continue; + switch (ifa->ifa_addr->sa_family) { + case AF_LINK: { + struct if_data *if_data; + + if_data = (struct if_data *)ifa->ifa_data; + rdomain = if_data->ifi_rdomain; + break; + } + case AF_INET6: { + struct sockaddr_in6 *s6; + s6 = (struct sockaddr_in6 *)ifa->ifa_addr; #ifdef __KAME__ - if (IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr) && - s6->sin6_scope_id == 0) { - s6->sin6_scope_id = - ntohs(*(u_int16_t *) - &s6->sin6_addr.s6_addr[2]); - s6->sin6_addr.s6_addr[2] = - s6->sin6_addr.s6_addr[3] = 0; - } -#endif - if (IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr)) - sin6 = s6; - break; + if (IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr) && + s6->sin6_scope_id == 0) { + s6->sin6_scope_id = ntohs(*(u_int16_t *) + &s6->sin6_addr.s6_addr[2]); + s6->sin6_addr.s6_addr[2] = + s6->sin6_addr.s6_addr[3] = 0; } - default: - break; +#endif + if (IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr)) + sin6 = s6; + break; + } + default: + break; - } + } } if(sin6 == NULL) {